Learn R Programming

PatientLevelPrediction (version 6.4.1)

loadPlpModel: loads the plp model

Description

loads the plp model

Usage

loadPlpModel(dirPath)

Value

                    The plpModel object

Arguments

dirPath

The location of the model

Details

Loads a plp model that was saved using savePlpModel()

Examples

Run this code
  # takes too long 
data("simulationProfile")
plpData <- simulatePlpData(simulationProfile, n = 1000)
saveLoc <- file.path(tempdir(), "loadPlpModel")
plpResult <- runPlp(plpData, outcomeId = 3, saveDirectory = saveLoc)
savePlpModel(plpResult$model, file.path(saveLoc, "savedModel"))
loadedModel <- loadPlpModel(file.path(saveLoc, "savedModel"))
# show design of loaded model
str(loadedModel$modelDesign)

# clean up
unlink(saveLoc, recursive = TRUE)

Run the code above in your browser using DataLab