output_table: Reads all $TABLE outputs and merge with input dataset

View source: R/output_table.R

output_tableR Documentation

Reads all $TABLE outputs and merge with input dataset

Description

[Stable]

Produces a single merged output dataset will all columns of $INPUT dataset. This is useful for reuse of exploratory data plots as diagnostic plots as all columns including text columns used for ggplot facetting will be present.

Usage

output_table(r, only_append = c(), ...)

output_table_first(r, ...)

Arguments

r

An object of class nm.

only_append

Optional character vector. If missing will append all, otherwise will append only those variables requested.

...

Optional additional arguments to pass on to read.csv of orig data.

Value

A list of tibbles with merged version of all output $TABLEs and the input data. Additional columns will be INNONMEM which will be TRUE for rows that were not ignored by NONMEM. For simulation control files there is also DV_OUT which will contain simulated DV values. DV will always be unmodified from the input dataset.

output_table_first will return a tibble with a single run.

See Also

nm_render(), input_data()

Examples


## requires NONMEM to be installed

## Not run: 

## exploratory data plot
read_derived_data("DerivedData/data.csv") %>%
  ggplot(aes(x = TIME, y = DV)) +
  theme_bw() +
  geom_point() +
  geom_line(aes(group = ID)) +
  facet_wrap(~STUDYTXT)

m1 %>%
  output_table_first() %>%
  ggplot(aes(x = TIME, y = DV)) +
  theme_bw() +
  geom_point() +
  geom_line(aes(group = ID)) +
  facet_wrap(~STUDYTXT) +
  ## additional layer for overlaying IPRED curves
  geom_line(aes(y = IPRED, group = ID))

## End(Not run)


NMproject documentation built on Sept. 30, 2022, 1:06 a.m.