nm_tables: Read all tables and input data

View source: R/nm-tables.R

nm_tablesR Documentation

Read all tables and input data

Description

Reads in the input data set and all table output files from a NONMEM run. This function will return a named list with all the relevant tibbles. To return a single tibble with the input data joined to the relevant table outputs, use the related nm_join() function. This function will print the number of rows and columns when each file is loaded. This printing can be suppressed by setting options(bbr.verbose = FALSE).

Usage

nm_tables(.mod, .files = nm_table_files(.mod))

nm_table_files(.mod, .check_exists = TRUE)

Arguments

.mod

A bbi_nonmem_model or bbi_nonmem_summary object, or a path to a NONMEM run.

.files

Character vector of file paths to table files to read in. Defaults to calling nm_table_files() on .mod, which will parse all file names from ⁠$TABLE⁠ blocks in the control stream. If passing manually, paths should be either absolute, or relative to get_output_dir(.mod).

.check_exists

If TRUE check if files exist.

Details

As described in Value, nm_tables() returns a named list of tibble(s). To return a single tibble will all of this data joined together, see nm_join().

Because nm_tables() calls nm_file() internally, it is not compatible with multiple tables written to a single file. See "Details" in nm_file() for alternatives.

Value

A named list of tibbles. The first element will always be named data and will contain the input data set. Subsequent elements will be named for the file from which they were loaded, with get_model_id(.mod) (and .) removed from the beginning and end, if present. For example, a model named ⁠001.ctl⁠ that generated a table named ⁠001.tab⁠ will have the relevant element named tab. Column names in all tibbles will be converted to uppercase.

Functions

  • nm_table_files(): Extract paths to table output files from NONMEM control stream, and optionally check if the files exist.

See Also

nm_join(), nm_file()


metrumresearchgroup/rbabylon documentation built on April 21, 2024, 3:26 a.m.