Skip to contents

Reads in the report yaml file and looks it to make sure it has all the necessary fields for the given report.

Usage

yaml_read_fit(
  obnd = NULL,
  rptyaml = NULL,
  placeholders = NULL,
  parameters = NULL,
  fit = NULL
)

Arguments

obnd

onbrand report object to have report elements appended to.

rptyaml

yaml file containing the report elements and structure.

placeholders

list of placeholders to overwrite defaults in the yaml file.

parameters

list with element names for each parameter to overwrite at runtime. with a named list for example RUN may be "RUNN" in the yaml file. To overwrite this just provide list(RUN="RUN_1") (default: NULL)

fit

nlmixr2 fit object to be reported.

Value

List containing the following information about the report

  • "isgood" - Boolean variable indicating success or failure

  • "msgs" - Vector of messages

  • "rpttype" - Type of onbrand report ("Word" or "PowerPoint")

  • "rptfigfmt" - Default figure formatting (orientation and dimensions)

  • "rpttabfmt" - Default table formatting (orientation and dimensions)

  • "rptdetails" - Contents of the yaml file

  • "rptcont" - Contents of the report to generate

Examples

# We need an onbrand object to use below
library(onbrand)  
obnd = read_template(
 template = system.file(package="nlmixr2rpt", "templates","nlmixr_obnd_template.docx"),
 mapping  = system.file(package="nlmixr2rpt", "templates","nlmixr_obnd_template.yaml"))

# We also need an nlmixr fit object
fit = fetch_fit_example()

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