eval_code | R Documentation |
qenv
Evaluate code in qenv
eval_code(object, code, ...)
object |
( |
code |
( |
... |
( |
eval_code()
evaluates given code in the qenv
environment and appends it to the code
slot.
Thus, if the qenv
had been instantiated empty, contents of the environment are always a result of the stored code.
qenv
environment with code/expr
evaluated or qenv.error
if evaluation fails.
within.qenv
# evaluate code in qenv
q <- qenv()
q <- eval_code(q, "a <- 1")
q <- eval_code(q, "b <- 2L # with comment")
q <- eval_code(q, quote(library(checkmate)))
q <- eval_code(q, expression(assert_number(a)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.