get_unit_of: get_unit_of

View source: R/functions_wrapper.R

get_unit_ofR Documentation

get_unit_of

Description

Derive the physical unit of a variable in the model

Unit information for the dataset needs to be available. The variable can be defined in the code, a dataset column, a parameter or a random variable. Optionally units could be derived for all variables in the model.

Usage

get_unit_of(model, variable = NULL)

Arguments

model

(Model) Pharmpy model

variable

(str or Expr (optional)) Find physical unit of this variable. For NULL get a list with units for all variables defined by the model.

Value

(Unit) A unit expression

Examples

## Not run: 
model <- load_example_model("pheno")
get_unit_of(model, "Y")
get_unit_of(model, "VC")
get_unit_of(model, "WGT")

## End(Not run)


pharmr documentation built on May 28, 2026, 5:08 p.m.