Description Usage Arguments Value Examples
Create a patch from environment injected objects and body.
1 | patch_template(provides, body)
|
provides |
list. Objects to inject into the patch's environment. |
body |
expression. The body to use for the patch. |
A patch with parent base environment and body body
.
1 2 3 4 | p <- objectdiff:::patch_template(list(a = 1), { a + object })
# function(object) { a + object }
# with environment containing a = 1
stopifnot(p(1) == 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.