file.mod: A path to a control stream. See also alternative lines argument. Notice, if write is TRUE (default) and newfile is not provided, file.mod will be overwritten.
newfile: An optional path to write the resulting control stream to. If nothing is provided, the default is to overwrite file.mod.
lines: Control stream lines as a character vector. If you already read the control stream - say using NMdata::NMreadSection(), use this to modify the text lines.
wipe: The default behavior (wipe=FALSE) is to add the $SIZES values to any existing values found. If SIZES parameter names are overlapping with existing, the values will be updated. If wipe=TRUE, any existing $SIZES section is disregarded.
write: Write results to newfile?
...: The $SIZES parameters. Provided anything, like PD=40 See examples.
Returns
Character lines with updated control stream
Examples
## No existing SIZES in control stream## Not run:file.mod <- system.file("examples/nonmem/xgxr032.mod",package="NMsim")NMupdateSizes(file.mod,LTV=50,write=FALSE)## End(Not run)## This controls stream has existing SIZES## Not run:file.mod <- system.file("examples/nonmem/xgxr134.mod",package="NMsim")NMupdateSizes(file.mod,LTV=50,write=FALSE)## End(Not run)## provide control stream as text lines## Not run:file.mod <- system.file("examples/nonmem/xgxr032.mod",package="NMsim")lines <- readLines(file.mod)NMupdateSizes(lines=lines,LTV=50,write=FALSE)## End(Not run)