I've read a.csv file into R, ran some code to edit it and now want to export this data frame as a.csv This so I can read it into R again for some different editing. How do I do this the correct way (meaning clean code)
Assuming your data is called df
write.csv(df, "specify_path_and_file_name.csv")
write.csv(dataframe,"~/Downloads/filename.csv", row.names = FALSE)
Different computers use different directions for slashes (\or/)and on a mac, I typically have to do the "~/ " at the beginning for windows it is typically "C:"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.