mock_context | R Documentation |
mock_context()
does some magic so calls to current_selection()
and other
functions using context information (i.e. document content, id, path, and selection(s))
will fetch preset data. It is useful to design tests. call unmock
mock_context(contents = "", id = 1, path = "", selection = NULL)
contents |
A character vector containing lines of code |
id |
A number |
path |
A string |
selection |
A nested list where elements are named lists of |
Returns NULL
invisibly, Called for side effects.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.