write_csv function

Write to a csv file

Write to a csv file

write_csv(data = NULL, name = NULL, timestamp = NULL)

Arguments

  • data: a data object (a data frame or a data.table)
  • name: a character string of the csv file name without the ".csv" extension. For example, if the csv file to write to is "myfile.csv", enter name = "myfile"
  • timestamp: logical. Should the timestamp be appended to the file name?

Returns

the output will be a .csv file in the working directory, that is, an output from the data.table function, fwrite

Examples

## Not run: write_csv(mtcars, "mtcars_from_write_csv") write_csv(mtcars) ## End(Not run)