# Example usage of writing an RCDF file
rcdf_data <- rcdf_list()
rcdf_data$mtcars <- mtcars
dir <- system.file("extdata", package = "rcdf")
temp_dir <- tempdir()
write_rcdf(
data = rcdf_data,
path = file.path(temp_dir, "mtcars.rcdf"),
pub_key = file.path(dir, 'sample-public-key.pem')
)
write_rcdf(
data = rcdf_data,
path = file.path(temp_dir, "mtcars-pw.rcdf"),
pub_key = file.path(dir, 'sample-public-key-pw.pem')
)
unlink(file.path(temp_dir, "mtcars.rcdf"), force = TRUE)
unlink(file.path(temp_dir, "mtcars-pw.rcdf"), force = TRUE)
Run the code above in your browser using DataLab