| with_mock | R Documentation |
with_mock() and local_mock() are now defunct, and can be replaced by
with_mocked_bindings() and local_mocked_bindings(). These functions only
worked by abusing of R's internals.
with_mock(..., .env = topenv())
local_mock(..., .env = topenv(), .local_envir = parent.frame())
... |
named parameters redefine mocked functions, unnamed parameters will be evaluated after mocking the functions |
.env |
the environment in which to patch the functions, defaults to the top-level environment. A character is interpreted as package name. |
.local_envir |
Environment in which to add exit handler. For expert use only. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.