Skip to content

Internals

Neal Fultz edited this page Apr 6, 2018 · 1 revision

In the default R file (hello.R), there are three helper functions:

  • template_text

    This extracts the "body code" from a template function. The body text begins with {{{ and ends with }}}. It will also attempt to deindent it. It is meant to be used in a the knitr code= option.

  • template_default_args_text

    This generates a "default argument code" chunk from a template. All arguments should provide a default value. It is meant to be used in a the knitr code= option.

  • diagnose_design

    This wraps the DeclareDesign::diagnose_design function in a very simple knitr memoization. It will save a file chunk-label.RDS containing the simulations and diagnosands, so be sure to set the chunk label.

Clone this wiki locally