Writes each table in the RCDF object to a .sav file using the haven package for compatibility with SPSS.
Arguments
- data
A valid RCDF object.
- path
Output directory for files.
- ...
Additional arguments passed to
haven::write_sav().- parent_dir
Optional subdirectory under
pathto group SPSS files.
Examples
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_sav(data = rcdf_data, path = temp_dir)
unlink(temp_dir, force = TRUE)