Description Usage Arguments Details Examples
expr_find()
finds the full expression; expr_text()
turns the
expression into a single string; expr_label()
formats it nicely for
use in messages. expr_env()
finds the environment associated with
the expression.
1 2 3 4 5 6 7 |
x |
A promise (function argument) |
width |
Width of each line |
nlines |
Maximum number of lines to extract. |
default_env |
If supplied, |
These functions never force promises, and will work even if a promise has previously been forced.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # Unlike substitute(), expr_find() finds the original expression
f <- function(x) g(x)
g <- function(y) h(y)
h <- function(z) list(substitute(z), expr_find(z))
f(1 + 2 + 3)
expr_label(10)
# Names a quoted with ``
expr_label(x)
# Strings are encoded
expr_label("a\nb")
# Expressions are captured
expr_label(a + b + c)
# Long expressions are collapsed
expr_label(foo({
1 + 2
print(x)
}))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.