read_nm_table {ncappc} | R Documentation |
Read NONMEM table files produced.
Description
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")
Arguments
nm_table |
The NONMEM table file to read. A text string. If |
only_obs |
Should the non-observation lines in the data set be removed?
Currently filtered using the expected |
method |
Can be one of |
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 |
Details
Currently the function searches the $TABLE
for multiple header lines,
and uses that to identify multiple simulations. The function expects at least
one header line (NOHEADER
option is not allowed in NONMEM table
files).
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
.