Description Usage Arguments Details Value Author(s) References See Also
This family of functions implements the class nmctl
: an object
model of the NONMEM control stream. nmctl
models a control stream
as a list of records; each record is a character vector. The read and write
functions (not generic) convert nmctl
to and from file format. The
print, format, and as.character
methods display nmctl
as it normally looks
in a text editor. as.list.nmctl
simply unclasses its argument.
as.nmctl.character
does the heavy work, breaking up a character
vector into records and storing as a list. If parse
is TRUE
,
as.nmctl
attempts to convert certain records to higher-level objects: currently
the theta
record will be converted to initList
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ## S3 method for class 'nmctl'
as.character(x, ...)
## S3 method for class 'nmctl'
as.list(x, ...)
## S3 method for class 'character'
as.nmctl(
x,
pattern='^ *\\$([^ ]+)( .*)?$',
head='\\1',
tail='\\2',
parse=FALSE,
...
)
## S3 method for class 'nmctl'
format(x, ...)
## S3 method for class 'nmctl'
print(x, ...)
read.nmctl(con,parse=FALSE, ...)
write.nmctl(
x,
file = "data",
ncolumns = 1,
append = FALSE,
sep = " ",
...
)
## S3 method for class 'nmctl'
x[..., drop = TRUE]
## S3 method for class 'nmctl'
x[[..., drop = TRUE]]
|
x |
an nmctl object (or analogous character vector) |
... |
extra arguments passed to other functions |
pattern |
regular expression for first line of a control record |
head |
regular expression (relative to |
tail |
regular expression (relative to |
con |
a connection or the name of a file to open |
parse |
whether to create R objects from the character vectors serving as records |
file |
passed to |
ncolumns |
passed to |
append |
passed to |
sep |
passed to |
drop |
coerce to lowest possible dimension |
Serendipitously, the record indicator in NONMEM control stream syntax is the
same as the element selector in R list syntax: $. The convention is that names
of elements in nmctl
(lower case) are converted to record types (upper case)
in the control stream. The user is free to add, delete, rearrange, and edit
records using standard list manipulation techniques. When printed, records
appear in list order. The write function warns if the 80 character limit is exceeded
(not including comments).
as.character.nmctl |
a character vector representing a control stream |
as.list |
a list representing a control stream |
as.nmctl.character |
a control stream object |
format.nmctl |
character |
print.nmctl |
character |
read.nmctl |
a control stream object |
write.nmctl |
used for side effects |
Tim Bergsma
http://metrumrg.googlecode.com
as.initList
write
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.