Closed rhcaeb closed 4 years ago
Question: In the application, the function write.csv() includes an additional column to the newly saved .csv file;
Is there a workaround for this? or does it include the row names (e.g., 1,2,3,4,5...etc.)? See 'Files Changed' for working example, there is a "" column before date.
Question: In the application, the function write.csv() includes an additional column to the newly saved .csv file;
Is there a workaround for this? or does it include the row names (e.g., 1,2,3,4,5...etc.)? See 'Files Changed' for working example, there is a "" column before date.
Try adding row.names = FALSE to write.csv()
row.names = FALSE works... sort of weird default behavior for R to assume the row number are row names. This is something I need to look more into...
In other news, you can also add quote = FALSE to write.csv() if you do not want to have strings quoted in the CSV file. I do not have an opinion on which way is better. I know you need quotes if the value separating your data (comma -- hence CSV) is being used in your data. Those commas need to be inside quotes or your data table is going to be a mess!
Application 2-6
Notes
Pending review @belinskyc