[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.

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.

Examples


## requires NONMEM to be installed

if (FALSE) {

## 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))
}