Reputation: 147
I have a .csv file with 175 rows and 6 columns. I want to append a 176th row. My code is as follows:
x <- data.frame('1', 'ab', 'username', '<some.sentence>', '2017-05-04T00:51:35Z', '24')
write.table(x, file = "Tweets.csv", append = T)
What I expect to see is:
Instead, my result is:
How should I change my code?
Upvotes: 9
Views: 12347
Reputation: 1475
write.table(x, file = "Tweets.csv", sep = ",", append = TRUE, quote = FALSE,
col.names = FALSE, row.names = FALSE)
Upvotes: 11