| bquote | R Documentation |
An analogue of the LISP backquote macro. bquote quotes its
argument except that terms wrapped in .() are evaluated in the
specified where environment. If splice = TRUE then
terms wrapped in ..() are evaluated and spliced into a call.
bquote(expr, where = parent.frame(), splice = FALSE)
expr |
A language object. |
where |
An environment. |
splice |
Logical; if |
A language object.
quote, substitute
require(graphics)
a <- 2
bquote(a == a)
quote(a == a)
bquote(a == .(a))
substitute(a == A, list(A = a))
plot(1:10, a*(1:10), main = bquote(a == .(a)))
## to set a function default arg
default <- 1
bquote( function(x, y = .(default)) x+y )
exprs <- expression(x <- 1, y <- 2, x + y)
bquote(function() {..(exprs)}, splice = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.