mk_table_nca_params {ruminate}R Documentation

Create Tabular Output from PKNCA Results

Description

Create paginated tables from PKNCA to use in reports and Shiny apps.

Usage

mk_table_nca_params(
  nca_res,
  type = "individual",
  grouping = "interval",
  not_calc = "NC",
  obnd = NULL,
  nps = NULL,
  mult_str = "*",
  infinity = "inf",
  digits = NULL,
  text_format = "text",
  notes_detect = NULL,
  max_height = 7,
  max_width = 6.5,
  max_row = NULL,
  max_col = NULL
)

Arguments

nca_res

Output of PKNCA.

type

Type of table to generate. Can be either "individual" or "summary"].

grouping

How to group columns in tables. Can be either "interval" or "parameter"].

not_calc

Text string to replace NA values with to indicated values were not calculated.

obnd

onbrand reporting object.

nps

NCA parameter summary table with the following columns.

  • parameter: PKNCA Paramter name.

  • text: Name used in text output.

  • md: Name used markdown output.

  • latex: Name used in latex output.

  • description: Verbose textual description of the parameter.

mult_str

Text string to replace * values in units.

infinity

Text string to replace infinity in time intervals in column headers.

digits

Number of significant figures to report (set to NULL to disable rounding)

text_format

Either "md" for markdown or "text" (default) for plain text.

notes_detect

Vector of strings to detect in output tables (example c("NC", "BLQ")).

max_height

Maximum height of the final table in inches (A value of NULL will use 100 inches).

max_width

Maximum width of the final table in inches (A value of NULL will use 100 inches).

max_row

Maximum number of rows to have on a page. Spillover will hang over the side of the page..

max_col

Maximum number of columns to have on a page. Spillover will be wrapped to multiple pages.

Value

list containing the following elements

Examples

id     = "NCA"
id_UD  = "UD"
id_DW  = "DW"
id_ASM = "ASM"

# We need a state variable to be define
sess_res = NCA_test_mksession(session=list(),
     id     = id,
     id_UD  = id_UD,
     id_DW  = id_DW,
     id_ASM = id_ASM,
     full_session=FALSE)

state = sess_res$state

# Pulls out the active analysis
current_ana = NCA_fetch_current_ana(state)

# This is the raw PKNCA output
pknca_res = NCA_fetch_ana_pknca(state, current_ana)

# Parameter reporting details from the ruminate configuration
nps  = state[["NCA"]][["nca_parameters"]][["summary"]]

# Building the figure
mk_res = mk_table_nca_params(nca_res = pknca_res, nps=nps, digits=3)
mk_res$tables[["Table 1"]]$ft

[Package ruminate version 0.2.2 Index]