Commands:

t <- data.frame(v = 5:1, v2 = 9:5)
write.csv(t, "t.csv")

Resulting file:

# "","v","v2"
# "1",5,9
# "2",4,8
# "3",3,7
# "4",2,6
# "5",1,5

How do I prevent first column with row index from being written to the file?

2 Answers
2

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *