Learn R Programming

nlmixr2rpt (version 0.2.2)

fetch_option: Fetch Analysis Options

Description

Fetches analysis options from the report yaml applies it to strings.

Usage

fetch_option(rptdetails, option = NULL, fit = NULL, verbose = TRUE)

Value

List containing the following information about the output directory

  • "isgood" - Boolean variable indicating success or failure

  • "msgs" - Vector of messages

  • "value" - The value of the option or the default if not specified

Arguments

rptdetails

Object creating when reading in rptyaml file

option

String containing the option to fetch (see below)

fit

nlmixr2 fit object to be reported

verbose

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

Details

The option can be one of the following (default: NULL):

  • "output_dir" - Directory to place figures that are generated (default: tempdir())

  • "resolution" - Resolution of figure files (default: 300)

Examples

Run this code
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


fetch_option(rptdetails, option="output_dir", fit=fit)

Run the code above in your browser using DataLab