% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rxode2.R
\name{rxGetModel}
\alias{rxGetModel}
\title{Get the rxode2 model variables without compiling the model}
\usage{
rxGetModel(
  model,
  calcSens = NULL,
  calcJac = NULL,
  collapseModel = NULL,
  indLin = FALSE,
  calcSens2 = NULL,
  calcSens3 = NULL
)
}
\arguments{
\item{model}{The model to get the model variables from.  It can
be: rxode2 model text (a character string, \code{rxModelText}, or a
\code{{}} expression), a function or call whose body is the model, an
\code{rxode2} object, an \code{rxModelVars} object, an \code{rxDll} object, or
anything else \code{rxModelVars()} accepts.}

\item{calcSens}{boolean indicating if rxode2 will calculate the
sensitivities according to the specified ODEs.  May also be a
character vector of the states/parameters whose first-order
sensitivities (\verb{rx__sens_<state>_BY_<param>__}) should be
generated.}

\item{calcJac}{boolean indicating if rxode2 will calculate the
Jacobain according to the specified ODEs.}

\item{collapseModel}{boolean indicating if rxode2 will remove all
LHS variables when calculating sensitivities.}

\item{indLin}{Calculate inductive linearization matrices and
compile with inductive linearization support.}

\item{calcSens2}{character vector (or \code{NULL}) requesting
second-order sensitivities in addition to the first-order ones
from \code{calcSens}.  When supplied, rxode2 also generates the
\verb{rx__sens_<state>_BY_<p>_BY_<q>__} compartments (the Hessian
path), where \code{p} ranges over \code{calcSens} and \code{q} over
\code{calcSens2}.  Used, for example, for population (\code{THETA})
second-order event sensitivities.  \code{NULL} (the default) skips the
second-order generation.}

\item{calcSens3}{character vector (or \code{NULL}) requesting third-order
sensitivities in addition to the first- and second-order ones.
Requires \code{calcSens2} to also be supplied (every \code{calcSens3}
parameter needs its own already-built second-order sensitivity
compartment, from the pairing of \code{calcSens2} with \code{calcSens3}, to
reference -- so \code{calcSens3} should be a subset of \code{calcSens2},
which itself should be a subset of \code{calcSens}, mirroring how
\code{calcSens2} is used everywhere else in rxode2 today).  When
supplied, generates the \verb{rx__sens_<state>_BY_<p>_BY_<q>_BY_<r>__}
compartments, where \code{p} ranges over \code{calcSens}, \code{q} over
\code{calcSens2}, and \code{r} over \code{calcSens3}, via \code{rxExpandSens3_()}.
\code{NULL} (the default) skips the third-order generation.}
}
\value{
An \code{rxModelVars} object of the (possibly rewritten) model
}
\description{
Normalizes the input to an \code{rxModelVars} object and optionally
rewrites the model text first: adding/stripping forward
sensitivity equations (\code{calcSens}/\code{calcSens2}/\code{calcSens3}),
adding/removing the \code{df()/dy()} Jacobian block (\code{calcJac}),
dropping LHS definitions (\code{collapseModel}), or converting to an
inductive linearization model (\code{indLin}).
}
\examples{

rxGetModel("d/dt(depot) = -ka*depot; d/dt(central) = ka*depot - kel*central")

}
\author{
Matthew L. Fidler
}
\keyword{internal}
