MonolixSuite in R
Breadcrumbs

setStructuralModel

[Monolix - PKanalix] Set structural model file

Set the structural model.

Usage

R
setStructuralModel(modelFile)

Arguments

modelFile (character) Path to the model file. Can be absolute or relative to the current working directory.

Details

To use a model from the libraries, you can find the model name with getLibraryModelName and set modelFile = "lib:modelName.txt" with the name obtained.

See also

getStructuralModel

Examples

R
if (FALSE) {
setStructuralModel("/path/to/model/file.txt")
setStructuralModel("'lib:oral1_2cpt_kaClV1QV2.txt'")

# working example to set a model from the library:

initializeLixoftConnectors("monolix",force = TRUE)
loadProject(file.path(getDemoPath(),"1.creating_and_using_models","1.1.libraries_of_models","warfarinPK_project.mlxtran"))
#check model currently loaded:
getStructuralModel()
#get the name for a model from the library with 2 compartments:
LibModel2cpt = getLibraryModelName(library = "pk", filters = list(administration = "oral", delay = "lagTime", absorption = "firstOrder", distribution = "2compartments", elimination = "linear", parametrization = "clearance"))
#check model content:
getLibraryModelContent(LibModel2cpt)
#set this new model in the project:
setStructuralModel(LibModel2cpt)
# check that the project has now the new model instead of the previous one:
getStructuralModel()
}