savePlpData
saves an object of type plpData to folder.
Value
Called for its side effect, the data will be written to a set of files in the folder specified by the user.
Examples
data("simulationProfile")
plpData <- simulatePlpData(simulationProfile, n = 500)
#> Generating covariates
#> Generating cohorts
#> Generating outcomes
saveLoc <- file.path(tempdir(), "savePlpData")
savePlpData(plpData, saveLoc)
dir(saveLoc, full.names = TRUE)
#> [1] "/tmp/RtmpPJeNgk/savePlpData/cohorts.rds"
#> [2] "/tmp/RtmpPJeNgk/savePlpData/covariates"
#> [3] "/tmp/RtmpPJeNgk/savePlpData/metaData.rds"
#> [4] "/tmp/RtmpPJeNgk/savePlpData/outcomes.rds"
#> [5] "/tmp/RtmpPJeNgk/savePlpData/timeRef.rds"
# clean up
unlink(saveLoc, recursive = TRUE)