1

I am trying to append a new row of data to an existing .csv file but everytime I do so, it doesn't add it to a new row. Instead, it just appends to the last row like so:

It doesn't add below it, but next to it

Also, the first column is supposed to show the date but I'm not sure why it shows up as hashtags. But in the column where it shows 33882020-09-24, it should end at 3388 and everything else after that should be in their respective column below.

Here is what I have for my code. I've followed multiple forums on how to append to .csv files and did exactly what was shown so I am at a loss..

R code example

Any suggestions would be greatly appreciated! Thank you in advance!!

Phil
  • 7,287
  • 3
  • 36
  • 66
Doughey
  • 147
  • 7

1 Answers1

1

For the data, is possible that the Rstudio don't recognise the number as a data (because you use -, and for R is a operation. Try don't use this symbol, but for example_) or try to write 24sept2020. For add a new row a found this info: How can a add a row to a data frame in R?

Giorgia
  • 59
  • 11