Description Usage Details Value
Render example from R code stored on the clipboard
1 |
Similar to reprex::reprex()
or knitr::spin(text=, envir=new.env(),
report=FALSE)
, but stripped down to the very basics. Input is plain valid R
code taken from the clipboard. It is run in a fresh environment and both
commands and results are catured. Commands are kept as is, but results are
commented out. Instead of using three backticks to indicate code for markdown,
each line has four whitespaces prepended. fingerknit
output is also
valid R code.
The clipboard is used for both input and output, but the output is also returned invisibly as a character string. Warnings and errors are not captured, but printed to console as normal. If an error is encountered nothing is returned and the clipboard data remains unchanged.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.