% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/checkModelConventions.R
\name{checkModelConventions}
\alias{checkModelConventions}
\title{Check a model against nlmixr2lib conventions}
\usage{
checkModelConventions(model, verbose = TRUE)
}
\arguments{
\item{model}{Model to check. Accepted forms:
- character scalar: resolved via [readModelDb()].
- function: evaluated via `nlmixr2est::nlmixr()`.
- `rxUi` object: used directly.
- missing / `NULL`: iterate over every model in `modeldb`.}

\item{verbose}{Logical; if `TRUE` (default) print the per-category report
to the console via `cli`.}
}
\value{
Invisibly, a `data.frame` with one row per issue and columns
  `model`, `category`, `severity`, `name`, `message`, `suggestion`.
}
\description{
Parses a model and reports deviations from the nlmixr2lib conventions
documented in `vignettes/create-model-library.Rmd` and the
`extract-literature-model` skill references (especially
`naming-conventions.md` and `inst/references/covariate-columns.md`). The checker inspects:
file-level metadata (description, reference, units, covariateData);
parameter names (log-prefix PK params, `eta`-prefix IIV, `propSd`/`addSd`
residual error); parameter labels; covariates (canonical register, units,
declared aliases); compartment names; the observation variable (`Cc`); and
a syntactic dosing-vs-concentration unit cross-check.
}
\details{
When any issue of severity `"error"` or `"warning"` is found, a `warning()`
is emitted whose message directs the user to call this function for the
full report.
}
\examples{
\dontrun{
checkModelConventions("PK_1cmt_des")
checkModelConventions()            # check every model in modeldb
}
}
