Learn R Programming

nlmixr2rpt (version 0.2.2)

process_ph: Substitutes Placehodlers in Strings

Description

Takes placeholder information from the rptyaml file and applies it to strings.

Usage

process_ph(str, rptdetails)

Value

processed string

Arguments

str

String to process

rptdetails

Object creating when reading in rptyaml file (default: NULL)

Examples

Run this code
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 as well
rptdetails = yaml_read_fit(
 obnd    = obnd,
 rptyaml = system.file(package="nlmixr2rpt", "examples", "report_fit_test.yaml"),
 fit     = fit)$rptdetails

str = "This is ===CMPD==="

process_ph(str, rptdetails)

Run the code above in your browser using DataLab