export_data: Export Processed Data

Description Usage Arguments Details Value See Also Examples

Description

Export any dataframe that has been processed in R

Usage

1
2
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: ”

Details

DETAILS

Value

OUTPUT_DESCRIPTION

See Also

case_when

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## 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/")

## End(Not run)

the-pudding/puddingR documentation built on June 25, 2019, 12:15 a.m.