expression(...) as.expression(x) is.expression(x)
expression.
expression returns an expression, that is, a list-like
object of mode
"expression".
Its elements are the arguments, unsubstituted and unevaluated.
as.expression merely changes the mode of
x to
"expression".
is.expression returns
TRUE if
x has mode
"expression" and
FALSE
otherwise.
Both
is.expression and
as.expression are generic functions; currently
there are no methods defined for either of these.
The output from
parse is of mode
"expression".
methods <- expression(lsfit(x,y), l1fit(x,y))
eval(methods[[which]])
rand.choice <- expression("Gaussian"=rnorm(1),"exp"=rexp(1),"uniform"=runif(1))
eval(rand.choice[["exp"]])