Learn R Programming

PatientLevelPrediction (version 6.4.0)

savePlpData: Save the plpData to folder

Description

savePlpData saves an object of type plpData to folder.

Usage

savePlpData(plpData, file, envir = NULL, overwrite = FALSE)

Value

Called for its side effect, the data will be written to a set of files in the folder specified by the user.

Arguments

plpData

An object of type plpData as generated using getPlpData.

file

The name of the folder where the data will be written. The folder should not yet exist.

envir

The environment for to evaluate variables when saving

overwrite

Whether to force overwrite an existing file

Examples

Run this code
data("simulationProfile")
plpData <- simulatePlpData(simulationProfile, n = 500)
saveLoc <- file.path(tempdir(), "savePlpData")
savePlpData(plpData, saveLoc)
dir(saveLoc, full.names = TRUE)

# clean up
unlink(saveLoc, recursive = TRUE)

Run the code above in your browser using DataLab