rtry_export {rtry}R Documentation

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")

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.

Value

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

References

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

Examples

# 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

[Package rtry version 1.1.0 Index]