Reputation: 324
# saving the work as ... data_full.csv
write.csv(data.full, "data_full.csv", col.names = TRUE)
#importing file
data.dir <- file.choose()
data <- read.csv(data.dir, header = TRUE)
data.full
was written as
but data
got read as
Can anyone suggest me a solution, on how to solve this simple problem?
Upvotes: 9
Views: 15814
Reputation: 18445
In your write.csv
statement use the option row.names=FALSE
to suppress the first column - it is on by default.
Upvotes: 16