gen_pest_table: Makes 'nlmixr2' Parameter Estimate Table for Reporting

View source: R/build_tables.R

gen_pest_tableR Documentation

Makes nlmixr2 Parameter Estimate Table for Reporting

Description

Generates a flextable containting the parameter estimates.

Usage

gen_pest_table(obnd = NULL, fit = NULL, rptdetails = NULL, verbose = TRUE)

Arguments

obnd

onbrand report object to have report elements appended to

fit

nlmixr2 fit object to be reported

rptdetails

object creating when reading in rptyaml file

verbose

Boolean variable when set to TRUE (default) messages will be displayed on the terminal

Value

List with the following elements

  • "isgood" - Boolean variable indicating success or failure

  • "msgs" - Vector of messages

  • "ft" - Parameter estimates as a flextable object

  • "df" - Parameter estimates as a data.frame

Examples

library(onbrand)  
obnd = read_template(
 template = system.file(package="nlmixr2rpt", "templates","nlmixr_obnd_template.pptx"),
 mapping  = system.file(package="nlmixr2rpt", "templates","nlmixr_obnd_template.yaml"))

# This will create an example fit object to use in the examples below
fit = fetch_fit_example()

#'# This reads in the report details as well
rptdetails = yaml_read_fit(
 obnd    = obnd,
 rptyaml = system.file(package="nlmixr2rpt", "examples", "report_fit_test.yaml"),
 fit     = fit)$rptdetails

gen_pest_table(obnd = obnd, fit = fit, rptdetails = rptdetails, verbose = TRUE)

nlmixr2rpt documentation built on June 7, 2023, 5:49 p.m.