nm_render | R Documentation |
A wrapper around rmarkdown::render
for nm objects. Use markdown templates
to create a customised set of diagnostics to reuse on multiple models. In the
demo an example is shown in Scripts/basic_gof.Rmd
, but ideally you'll
create your own customised version with everything you need to evaluate your
model. To create an R markdown diagnostic template go to FILE
-> New File
-> R markdown
-> From Template
the select from one of the following:
model diagnostic
VPC diagnostic
PPC diagnostic
bootstrap results (nm_list_render
)
These are intentionally minimal templates that can be run as notebooks or as
automated diagnostics run with nm_render
. Follow the instructions at the
top of the template for more details.
nm_render( m, input, output_file = NA, args = list(), force = getOption("nm.force_render"), ... ) nm_list_render( m, input, output_file = NA, args = list(), force = getOption("nm.force_render"), ... )
m |
An nm object. |
input |
Character. Same as |
output_file |
Character. Same as |
args |
List. Same as "params" arg in |
force |
Logical (default = |
... |
Additional argument passed to |
input
must refer to a properly specified Rmd document. The R
markdown template "model diagnostic" in RStudio sets this up for you.
These R markdown templates are usable as R Notebooks (e.g. for code
development and debugging) if the object .m
is defined in the global work
space first.
nm_list_render()
is mostly used for bootstraps, and other routines where a
parent run spawns multiple children in the form of an nm_list
The same nm object, m
, with modified results_files
field.
## requires NONMEM to be installed ## Not run: m1 %>% nm_render("Scripts/basic_gof.Rmd") ## to run "Scripts/basic_gof.Rmd" as an R Notebook ## first define .m .m <- m1 ## Now you can run "Scripts/basic_gof.Rmd" as a Notebook ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.