Export any dataframe that has been processed in R

export_data(data, filename, location = "processed", directory = "auto",
  format = "csv", na = "")

Arguments

data

data frame to export

filename

the name of the exported file, without the extension

location

If using the puddingR file directory, automatically place the file inside either the open_data folder ("open") the processed_data ("processed"), or outside of the R directory, and in the larger Pudding starter template ("js"), Default: 'processed'

directory

Directory of the exported file. If set to "auto", this assumes that the project follows the puddingR structure. Otherwise, the "location" parameter is overwritten by the directory in this argument, Default: 'auto'

format

file output format (either "csv", "json", or "tsv"), Default: 'csv'

na

How to export NA values, Default: ''

Value

OUTPUT_DESCRIPTION

Details

DETAILS

See also

Examples

# NOT RUN {
# export a csv using the puddingR template
export_data(mtcars, "cars")

# export as json using the puddingR template
export_data(mtcars, "cars", format = "json")

# output csv to a location not using the puddingR template
export_data(mtcars, "cars", directory = "data/my_data/")
# }