Learn R Programming

rtry (version 1.1.0)

rtry_export: Export preprocessed data

Description

This function exports the preprocessed data as comma separated values to a .csv file. If the specified output directory does not exist, it will be created.

Usage

rtry_export(data, output, quote = TRUE, encoding = "UTF-8")

Value

No return value, called for exporting a .csv file.

Arguments

data

The data to be saved.

output

Output path.

quote

Default TRUE inserts double quotes around any character or factor columns.

encoding

Default "UTF-8". File encoding.

References

This function makes use of the write.csv function within the utils package.

Examples

Run this code
# Export the preprocessed data to a specific location
rtry_export(data_TRY_15160, file.path(tempdir(), "TRYdata_unprocessed.csv"))

# Expected message:
# File saved at: C:\Users\user\AppData\Local\Temp\Rtmp4wJAvQ/TRYdata_unprocessed.csv

Run the code above in your browser using DataLab