The function reads in NONMEM table files. The files can be created from the
$EST line or from the $SIM line in a NONMEM model file.
Usage
read_nm_table(
nm_table,
only_obs = FALSE,
method = "default",
quiet = TRUE,
sim_num = FALSE,
sim_name = "NSIM",
verbose = FALSE
)Arguments
- nm_table
The NONMEM table file to read. A text string. If
dplyrandreadrare available andmethod="default"ormethod="readr_*"thennm_tablecan either a path to a file, a connection, or literal data (either a single string or a raw vector). Files ending in .gz, .bz2, .xz, or .zip will be automatically uncompressed. Files starting with http://, https://, ftp://, or ftps:// will be automatically downloaded. Remote gz files can also be automatically downloaded & decompressed.- only_obs
Should the non-observation lines in the data set be removed? Currently filtered using the expected
MDVcolumn.TRUEorFALSE.- method
Can be one of
default,readr_1,readr_2,readr_3,slow.readr_1should be fastest. All butslowrequiredplyrandreadr(version >= 0.2.2).- quiet
Should there be verbose messages about what the function is doing?
- sim_num
Should the function add a column to the returned data frame that identifies the simulation number (if present)?
- sim_name
The name of the resulting column in the returned data frame if
sim_numis true.- verbose
Should the output be more verbose for error checking?
Value
Returns a data frame of the simulated table with an added column for
the simulation number. The data frame is given class c("tbl_df",
"tbl", "data.frame") for easy use with dplyr.