% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions_wrapper.R
\name{get_unit_of}
\alias{get_unit_of}
\title{get_unit_of}
\usage{
get_unit_of(model, variable = NULL)
}
\arguments{
\item{model}{(Model) Pharmpy model}

\item{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
}
\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.
}
\examples{
\dontrun{
model <- load_example_model("pheno")
get_unit_of(model, "Y")
get_unit_of(model, "VC")
get_unit_of(model, "WGT")
}

}
