Skip to contents

Appends nlmixr2 fit results to an onbrand report object with the content and format of the report in the supplied yaml file

Usage

report_fit(
  obnd = NULL,
  fit = NULL,
  placeholders = NULL,
  cat_covars = NULL,
  cont_covars = NULL,
  parameters = NULL,
  rptyaml = system.file(package = "nlmixr2rpt", "templates", "report_fit.yaml"),
  verbose = FALSE
)

Arguments

obnd

onbrand report object to have report elements appended to.

fit

nlmixr2 fit object to be reported.

placeholders

Manual placeholders, see yaml_read_fit for more.

cat_covars

character vector of categorical covariates to overwrite defaults in yaml file.

cont_covars

character vector of continuous covariates to overwrite defaults in yaml file.

parameters

list with element names for each parameter to overwrite defaults in yaml file.

rptyaml

yaml file containing the report elements and structure.

verbose

Boolean variable when set to TRUE messages will be .

Value

onbrand object with the report elements added.

Examples

# \donttest{
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()

# Appening fit results
obnd_pptx = report_fit(
 fit     = fit, 
 rptyaml = system.file(package="nlmixr2rpt", "examples", "report_fit_test.yaml"),
 obnd    = obnd)
#> ! Suggested package: ggPMX was not found
#> `geom_smooth()` using formula = 'y ~ x'
#> `geom_smooth()` using formula = 'y ~ x'

# Writing the report to a file
save_report(obnd, file.path(tempdir(), "report.pptx"))
#> $isgood
#> [1] TRUE
#> 
#> $msgs
#> NULL
#> 
# }