Skip to content
Prev 305642 / 398506 Next

Using paste to create and evaluate a variable expression

On Sep 16, 2012, at 9:04 PM, Bryan Keller wrote:

            
Of course.

?as.expression
?parse
?eval
Instead of noquote, you might want to look at bquote.
Evaluate in what context? It looks as though you are building a formula.

parse(text= paste(paste("X", 1, sep = ""), paste("X", 2, sep = ""), sep = "+") )
expression(X1+X2)