[R] multiple text placements and expressions revisited

Johannes Graumann johannes_graumann at web.de
Thu Jan 17 09:26:13 CET 2008


Hi all,

I asked something like this earlier but decided that a proper minimal
example might be helpfull ;0)

Why does this work with regards to the expression (substitution):

require(stats)
plot(cars)
text(5,120,labels=substitute(i^{z+phantom()}*"("*a*"
AMU)",list(i="yx",z=2,a=0)))
text(c(5,5),c(115,110),labels=c("One","Two"))

But adding this (using a vector of expressions/substitutions) fails to print
the expression correctly:

text(c(5,5),c(105,100),labels=c(substitute(i^{z+phantom()}*"("*a*"
AMU)",list(i="yx",z=2,a=0)),"Three"))

This is a bug, no?

Joh




More information about the R-help mailing list