A Function to Save Results in Multiple Formats

save_data(df, name = NULL, path = NULL, format = "rds",
  message = NULL, verbose = TRUE)

Arguments

df

The data to be saved in any R supported format.

name

A character string containing the name to save the data under.

path

A character string containing the file pathway to the folder into which to save the data. If not specified data will be saved into the home directory.

format

A character vector specifying the format/formats to save the data into, defaults to rds. Currently csv is also supported.

message

An optional character string specifying the message to print.

verbose

A logical indicating whether progress messages shoud be printed.

Value

Returns nothing, saves data in the specified file formats

Examples

## save_data(cars, name = "cars")