View source: R/build_figures.R
| fetch_fdim | R Documentation | 
For a given figure id and report type this will pull out the dimensions of the figure.
fetch_fdim(obnd = NULL, fid = NULL, fdim = "width", rptdetails = NULL)
| obnd | onbrand report object to have report elements appended to | 
| fid | Figure ID used in the figures section of the yaml file | 
| fdim | Dimension to fetch either "width" or "height" | 
| rptdetails | Object creating when reading in rptyaml file | 
ggplot object
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_fdim(obnd=obnd, fid="bad_figure", fdim="width", rptdetails=rptdetails)
fetch_fdim(obnd=obnd, fid="bad_figure", fdim="height", rptdetails=rptdetails)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.