[R] r-help[Q]: use of `expression' in annotation

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Tue Jan 19 17:56:47 CET 1999

Alex Buerkle <cbuerkle at bio.indiana.edu> writes:

> I would like petstring to contain r[rho*p] = peti, where peti is the corr.
> coefficient that would vary across panes in the figure.  I have tried
> various combinations of paste and expression and have not hit on the right
> combination (instead I usually get peti as a literal rather than a
> variable).

Consider the following:

for (x in 1:10) 
   text(x,x,as.expression(substitute(r[rho*p] == peti,list(peti=x/10))))

[which probably also indicates that the as.char.or.expr() function
used inside text() could use modification! The as.expression bit
should be avoidable on objects of mode call.]
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list