loadPlpModel: loads the plp model

View source: R/SaveLoadPlp.R

loadPlpModelR Documentation

loads the plp model

Description

loads the plp model

Usage

loadPlpModel(dirPath)

Arguments

dirPath

The location of the model

Details

Loads a plp model that was saved using savePlpModel()

Value

                    The plpModel object

Examples

 
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)


OHDSI/PatientLevelPrediction documentation built on Feb. 14, 2025, 9:44 a.m.