set_peripheral_compartments: set_peripheral_compartments

View source: R/functions_wrapper.R

set_peripheral_compartmentsR Documentation

set_peripheral_compartments

Description

Sets the number of peripheral compartments for central compartment to a specified number.

If name is set, the peripheral compartment will be added to the compartment with the specified name instead.

Usage

set_peripheral_compartments(model, n, name = NULL)

Arguments

model

(Model) Pharmpy model

n

(numeric) Number of transit compartments

name

(str (optional)) Name of compartment to add peripheral to.

Value

(Model) Pharmpy model object

See Also

add_peripheral_compartment

remove_peripheral_compartment

Examples

## Not run: 
model <- load_example_model("pheno")
model <- set_peripheral_compartments(model, 2)
model$statements$ode_system

## End(Not run)

pharmpy/pharmr documentation built on June 11, 2025, 11:56 a.m.