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

Alex Buerkle cbuerkle at bio.indiana.edu
Tue Jan 19 16:04:31 CET 1999


Dear r-helpers,

I have some multiplot figures that I would like to annotate.  To each plot
frame I would like to add the associated correlation coefficients.  To do
so, I believe I need to understand the usage of `expression' better.  

The following is a good start.

  petstring <- expression(paste(r[rho*p],"=" ))
  mtext(petstring, line=0.3, adj=0.1, cex=0.8) 

My question is, how can I interpolate a variable into this expression?  

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).

Thanks, Alex Buerkle

~^^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
C. Alex Buerkle                 Ph:  812-855-9018
Jordan Hall 142                 Fax: 812-855-6705
Department of Biology           
Indiana University
Bloomington, IN 47405    cbuerkle at bio.indiana.edu

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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