Extract all parameter comments from a model as ModelComments object
Source:R/comments-parsing.R
get_model_parameter_info.RdParses parameter comments from a completed NONMEM model run and returns structured metadata for theta, omega, and sigma parameters.
Comment Parsing Modes
The parsing behavior is controlled by the pharos.toml configuration file.
In the [nonmem.comments] section, set type = "type1" to enable structured
type1 comment parsing. If this setting is absent or set to any other value,
raw comment parsing is used (the default).
type1 mode: Expects comments in a structured format with explicit field delimiters. This mode provides more precise extraction but requires comments to follow the type1 specification.
raw mode (default): Flexibly parses parameter names, units, and descriptions from free-form comment text. More forgiving but may be less precise for complex comment structures.
Raw Comment Formats (default)
Applies to text after ; on lines within $THETA, $OMEGA, and $SIGMA
blocks.
Parsing pipeline in raw mode: extract transform -> strip prefix -> extract unit -> extract name.
THETA/SIGMA
General form:
[PREFIX] NAME [(UNIT)] [TRANSFORM_SEP TRANSFORM]
Common accepted examples:
CLCL (L/HR)CL [L/HR]CL ;expCL :LOGCL (L/HR) ;expTHETA1 CL (L/HR) ;exp1: CL (L/HR) ;exp
Notes:
Prefixes are case-insensitive; colon after prefix is optional.
Numeric prefixes like
1,1:,1-,1.are accepted.Units are read from
()or[], and can appear anywhere in the string.Colon transform form requires leading whitespace (e.g.,
CL :EXP).THETA strips trailing punctuation from extracted name tokens; SIGMA currently does not.
SIGMA also supports unit in transform segment, e.g.
Name ;Transform (unit).
OMEGA
General form:
[PREFIX] NAME_PART [THETA_REF] [TRANSFORM_SEP TRANSFORM]
Common accepted examples:
IIV-CL :EXPIIV CL ;expIIV on CL ;expCorr CL-V ;normal11: IIV CL ;expOMEGA(1,1): IIV CL ;exp
Notes:
THETA_REFmay split on-,/,:,,into multiple associated thetas.If full
THETA_REFmatches a known theta name (case-insensitive), it is kept whole (for example,CL/F).Linking words
on,for,ofare skipped in space-separated forms.
Transform keyword mapping (case-insensitive):
exp,log,lognormal->LogNormallogit->Logitadd,adderr,additive->AddErrlogadd,logadderr,logerr->LogAddErrprop,proportional->Proportionalidentity,normal,none->Identity