Reads in a whitespace-delimited NONMEM output file (for example .grd or .ext or a table output) or a NONMEM input data file. Will print the number of rows and columns when the file is loaded. This printing can be suppressed by setting options(bbr.verbose = FALSE).

nm_file(.mod, .suffix = NULL, ...)

nm_grd(.mod, .rename = TRUE)

nm_tab(.mod)

nm_par_tab(.mod)

nm_data(.mod)

Arguments

.mod

Either a bbi_nonmem_model, bbi_nonmem_summary, or a path to a file to read in. If passing model object to nm_file(), must also pass .suffix that will be passed through to build_path_from_model().

.suffix

Character vector to append the end of the absolute model path. Will be appended as is so, if passing a file extension, be sure to included the leading ".". See examples.

...

arguments passed through to methods. (Currently none.)

.rename

If TRUE, the default, will rename .grd columns to the relevant parameter names. Otherwise will leave column names as is.

Value

A tibble with the data from the specified file and estimation method.

Details

nm_file() is called internally by the family of functions in this help doc, as well as by nm_tables() and nm_join().

nm_file() assumes there is only one table per file and therefore nm_file() (and family) are not compatible with files that have multiple tables, for example an .ext file for a model with multiple estimation methods or a table file from a model using $SIM. For these kinds of files, consider using data.table::fread() with the skip and nrows arguments.

Functions

  • nm_grd(): Reads .grd file from a bbi_nonmem_model or bbi_nonmem_summary object

  • nm_tab(): Reads {get_model_id(.mod)}.tab file from a bbi_nonmem_model or bbi_nonmem_summary object

  • nm_par_tab(): Reads {get_model_id(.mod)}par.tab file from a bbi_nonmem_model or bbi_nonmem_summary object

  • nm_data(): Reads the input data file from a bbi_nonmem_model or bbi_nonmem_summary object