[R] How to concatenate expressions

2009-11-20 Thread Sebastien Bihorel
Dear R-users, I am developing a plotting function, which receives expressions and character/numerical vectors as part of the many input arguments and which tries to concatenate them before displaying the result to the plot. I currently cannot find a way to make this concatenation works. I

Re: [R] How to concatenate expressions

2009-11-20 Thread baptiste auguie
Hi, You can try this, though I hope to learn of a better way to do it, a = c(quote(alpha),quote(beta),quote(gamma)) b = lapply(1:3, function(x) as.character(x)) c = c(quote('-10'^th), quote('-20'^th), quote('-30'^th)) testplot - function(a,b,c) { text - lapply(seq_along(a),

Re: [R] How to concatenate expressions

2009-11-20 Thread Sebastien Bihorel
Thanks a bunch, Baptiste, Your lapply call works like a charm. BTW, it works also if a, b, and c are expressions :D Sebastien baptiste auguie wrote: Hi, You can try this, though I hope to learn of a better way to do it, a = c(quote(alpha),quote(beta),quote(gamma)) b = lapply(1:3,