saveDF | R Documentation |
Saves R object to disk using csv and/or Rdata format.
saveDF(
rObj,
note = NULL,
rData = FALSE,
csv = TRUE,
attr = FALSE,
timeStamp = TRUE,
folder = "_save_df"
)
rObj |
Name of R object to save. |
note |
Suffix to include in file name. |
rData |
Logical field to save rObj as an rData file (FALSE [default]). |
csv |
Logical field to save rObj as an a csv file (TRUE [default]). |
attr |
Logical field to save data frame attributes as a text file (FALSE [default]). |
timeStamp |
Logical field to include date/time stamp in file name (TRUE [default]). |
folder |
Subdirectory for saving file ('_save_df is default) |
Output files are saved with an "rObj_note_YYYY_MM_DD_HHMMSS" naming convetion. By default, files are saved as csv files to a '_save_df' subdirectory relative to the working directory and include a time stamp in the file name using utils::write.csv. The default folder can be changed with the folder argument. Inclusion of a time stamp in the file name enables saving the same object at multiple steps through an R script, but can be turned off with the timeStamp argument. To also save object as rData file, set rData=TRUE.
Nothing returned. Saves R object to disk using csv and/or Rdata format.
## Not run:
df <- data.frame(x=c(1:100))
saveDF(df, 'test_note')
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.