bquote
Partial substitution in expressions
An analogue of the LISP backquote macro. bquote
quotes its
argument except that terms wrapped in .()
are evaluated in the
specified where
environment.
- Keywords
- programming, data
Usage
bquote(expr, where = parent.frame())
Arguments
- expr
- where
An environment.
Value
See Also
Examples
library(base)
# NOT RUN {
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 )
# }
Community examples
Looks like there are no examples yet.