prettify_column_names: Convert the column names in a table of PK parameters into...

View source: R/prettify_column_names.R

prettify_column_namesR Documentation

Convert the column names in a table of PK parameters into more human-readable names

Description

prettify_column_names converts columns in a table of PK values from names such as "AUCinf_dose1" or "Cmax_last" to prettier names such as "Dose 1 AUCinf (ng/mL.h)" or "Last dose Cmax (ng/mL)". Alternatively, it can also be used to convert pretty column names into R-friendly coded names, e.g., "Dose 1 AUCinf (ng/mL.h)" becomes "AUCinf_dose1".

Usage

prettify_column_names(
  PKtable,
  prettify_compound_names = TRUE,
  pretty_or_ugly_cols = "pretty",
  return_which_are_PK = FALSE
)

Arguments

PKtable

a table of PK data with column names such as "AUCinf_dose1" or "Cmax_last" or a character vector of the names of a PK table

prettify_compound_names

Do you want to prettify your compound names? Options:

TRUE (default)

Make the compound names pretty in column titles and in any Word output files. This was designed for simulations where the substrate and any metabolites, perpetrators, or perpetrator metabolites are among the standard options for the simulator, and leaving prettify_compound_names = TRUE will make the name of those compounds something more human readable. For example, "SV-Rifampicin-MD" will become "rifampicin", and "Sim-Midazolam" will become "midazolam".

FALSE

Don't change any compound names.

a named character vector of compound IDs and what each should be prettified to

For example, prettify_compound_names = c("perpetrator" = "teeswiftavir", "substrate" = "superstatin"). Please note that "perpetrator" includes any of inhibitor 1, inhibitor 2, and inhibitor 1 metabolite, so, if you're setting the perpetrator name, you really should use something like this if you're including perpetrator metabolites: prettify_compound_names = c("perpetrator" = "teeswiftavir and 1-OH-teeswiftavir", "substrate" = "superstatin").

pretty_or_ugly_cols

Do you want "pretty" column names such as "Dose 1 AUCinf (ng/mL.h)" or do you want "ugly" but R friendly column names such as "AUCinf_dose1"? Options are "pretty" (default) or "ugly".

return_which_are_PK

TRUE or FALSE (default) for whether to, instead of prettifying, return a data.frame saying which column names are PK parameters and which are not.

Value

a PK table with prettier column names

Examples

# None yet


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