format_scripts: Format common PBPK model parameters to have appropriate...

View source: R/format_scripts.R

format_scriptsR Documentation

Format common PBPK model parameters to have appropriate subscripts and superscripts. UNDER CONSTRUCTION.

Description

Format common PBPK model parameters to have appropriate subscripts and superscripts. UNDER CONSTRUCTION.

Usage

format_scripts(
  DF,
  parameter_column,
  value_column,
  remove_compound_suffix = TRUE
)

Arguments

DF

a data.frame with a column containing, e.g., "ka (h^-1)", "fu,p", or other PBPK model parameters with syntax that matches what's in the column "Notes" in the object AllExpDetails, which is included with this package and is used extensively for figuring out how simulations were set up.

parameter_column

the name of the column in DF that contains your PK parameters, unquoted. For example, supply parameter_column = Notes

value_column

optionally supply the name of the column in DF that contains values for PK parameters, unquoted.

remove_compound_suffix

TRUE (default) or FALSE to remove the suffix that shows up in many PBPK elimination and interaction parameters to indicate which compound ID the parameter refers to. For example, "Vsac_sub" will be just "Vsac" and "Peff_human_inhib" will become "Peff,human" with the "eff,human" as a subscript. You should ONLY do this if your whole table refers to the same compound; otherwise, it will be completely unclear what's what.

Value

a flextable

Examples

DF <- data.frame(Parameter = c("MW", "ka (h^-1)",
                               "fu,p", "fu,gut", "fu,mic CYP3A4"),
                  Value = c(350, 0.5, 0.01, 0.8, 1))

format_scripts(DF = DF)


shirewoman2/Consultancy documentation built on Feb. 18, 2025, 10 p.m.