loadPrediction {PatientLevelPrediction} | R Documentation |
Loads the prediction dataframe to json
Description
Loads the prediction dataframe to json
Usage
loadPrediction(fileLocation)
Arguments
fileLocation |
The location with the saved prediction |
Details
Loads the prediciton json file
Value
The prediction data.frame
Examples
data("simulationProfile")
plpData <- simulatePlpData(simulationProfile, n = 1000)
saveLoc <- file.path(tempdir(), "loadPrediction")
results <- runPlp(plpData, outcomeId = 3, saveDirectory = saveLoc)
savePrediction(results$prediction, saveLoc)
dir(saveLoc)
loadedPrediction <- loadPrediction(file.path(saveLoc, "prediction.json"))
[Package PatientLevelPrediction version 6.4.1 Index]