R/NMrelate.R
NMrelate.Rd
Relate parameter names and variables based on control stream code sections.
NMrelate(file, lines, modelname, par.type, col.model, sections, as.fun)
Path to a control stream to process. See `lines` too.
If the control stream has been read already, the text can be provided here instead of using the `file` argument. Character vector of text lines.
Either a model name (like "Base") or a function that derives the model name from the control stream file path. The default is dropping the file name extension on the control stream file name.
Parameter type(s) to include. Default is all three
possible which is c("THETA","OMEGA","SIGMA")
.
Name of the column containing the model name.
Sections of the control stream to
consider. Default is all of c("PRED","PK","ERROR")
.
The default is to return data as a data.frame. Pass a function (say tibble::as_tibble) in as.fun to convert to something else. If data.tables are wanted, use as.fun="data.table". The default can be configured using NMdataConf.
data.frame relating parameters to variable names
`NMrelate()` processes $PRED, $PK and $ERROR sections. It does not read ext files or $THETA, $OMEGA, $SIGMA sections to gain information but only extracts what it can from the model code. You can then merge with information from functions such as `NMreadExt()` and `NMreadParText()`.