Learn R Programming

PatientLevelPrediction (version 6.4.1)

loadPrediction: Loads the prediction dataframe to json

Description

Loads the prediction dataframe to json

Usage

loadPrediction(fileLocation)

Value

                            The prediction data.frame

Arguments

fileLocation

The location with the saved prediction

Details

Loads the prediciton json file

Examples

Run this code
  # takes too long 
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"))

Run the code above in your browser using DataLab