Learn R Programming

PatientLevelPrediction (version 6.4.0)

savePlpShareable: Save the plp result as json files and csv files for transparent sharing

Description

Save the plp result as json files and csv files for transparent sharing

Usage

savePlpShareable(result, saveDirectory, minCellCount = 10)

Value

                       The directory path where the results were saved

Arguments

result

An object of class runPlp with development or validation results

saveDirectory

The directory the save the results as csv files

minCellCount

Minimum cell count for the covariateSummary and certain evaluation results

Details

Saves the main results json/csv files (these files can be read by the shiny app)

Examples

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

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

Run the code above in your browser using DataLab