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

\item{n}{(numeric) Number of transit compartments}

\item{keep_depot}{(logical) FALSE to convert depot compartment into a transit compartment}
}
\value{
(Model) Updated Pharmpy model
}
\description{
Set the number of transit compartments of model.

Initial estimate for the absorption delay is
set the previous delay if available, otherwise it is set to the time of first observation/2.
}
\examples{
\dontrun{
model <- load_example_model("pheno")
model <- set_transit_compartments(model, 3)
model$statements$ode_system
}
}
\seealso{
add_lag_time

set_n_transit_compartments
}
