process_ph {nlmixr2rpt} | R Documentation |
Substitutes Placehodlers in Strings
Description
Takes placeholder information from the rptyaml file and applies it to strings.
Usage
process_ph(str, rptdetails)
Arguments
str |
String to process |
rptdetails |
Object creating when reading in rptyaml file
(default: |
Value
processed string
Examples
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)
[Package nlmixr2rpt version 0.2.0 Index]