Learn R Programming

rcdf (version 0.1.2)

write_rcdf_csv: Write RCDF data to CSV files

Description

Writes each table in the RCDF object as a separate .csv file.

Usage

write_rcdf_csv(data, path, ..., parent_dir = NULL)

Value

Invisibly returns NULL. Files are written to disk.

Arguments

data

A valid RCDF object.

path

The base output directory.

...

Additional arguments passed to write.csv().

parent_dir

Optional subdirectory under path to group CSV files.

See Also

write_rcdf_as

Examples

Run this code
dir <- system.file("extdata", package = "rcdf")
rcdf_path <- file.path(dir, 'mtcars.rcdf')
private_key <- file.path(dir, 'sample-private-key.pem')

rcdf_data <- read_rcdf(path = rcdf_path, decryption_key = private_key)
temp_dir <- tempdir()

write_rcdf_csv(data = rcdf_data, path = temp_dir)

unlink(temp_dir, force = TRUE)

Run the code above in your browser using DataLab