% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_parmvar.r
\name{get_parmvar}
\alias{get_parmvar}
\title{Get the variables within a NONMEM model that should be passed to the simulation model}
\usage{
get_parmvar(lstblock, returnall = FALSE)
}
\arguments{
\item{lstblock}{list with each item being a separate structured dollar block, usually obtain from \code{\link{nmlistblock}}}

\item{returnall}{logical indicating if all variables should be returned or just the ones that are not defined}
}
\value{
a vector with model variables for the simulation model
}
\description{
This function go through all formulas and control flows to check if a parameter is created ad-hoc
or taken from the input file. This is important as these variables need to be set for simulation
}
\examples{

mod    <- system.file("example_models","PK.1CMT.ORAL.COV.mod", package = "amp.sim")
mdll   <- get_nmblock(mod,block=c("PK","DES"))
mdlls  <- nmlistblock(mdll)
get_parmvar(mdlls)

}
\author{
Richard Hooijmaijers
}
