Learn R Programming

PatientLevelPrediction (version 6.4.0)

savePlpResult: Saves the result from runPlp into the location directory

Description

Saves the result from runPlp into the location directory

Usage

savePlpResult(result, dirPath)

Value

                       The directory path where the results were saved

Arguments

result

The result of running runPlp()

dirPath

The directory to save the csv

Details

Saves the result from runPlp into the location directory

Examples

Run this code
  # takes too long 
data("simulationProfile")
plpData <- simulatePlpData(simulationProfile, n = 1000)
saveLoc <- file.path(tempdir(), "savePlpResult")
results <- runPlp(plpData, outcomeId = 3, saveDirectory = saveLoc)
# save the results
newSaveLoc <- file.path(tempdir(), "savePlpResult", "saved")
savePlpResult(results, newSaveLoc)
# show the saved results
dir(newSaveLoc, recursive = TRUE, full.names = TRUE)

# clean up
unlink(saveLoc, recursive = TRUE)
unlink(newSaveLoc, recursive = TRUE)

Run the code above in your browser using DataLab