- Published on
How to Write CSV in R
#Related Topics:
It's always better to write CSV with R after data preparation or cleaning in order to save the data for further analysis and to share with others.
Before writing any data frame or matrix to CSV, check the default working directory of your machine by the following command:
r
You can change your default working directory by the following command:
r
As an example lets say you have a data frame:
r
Now suppose you have cleaned or prepared the data frame, and you want to save the data frame. You can do that by the following command:
r