[R] mtext, picking subscript text from colnames(df)

Tord Snäll Tord.Snall at ekol.slu.se
Thu Aug 30 17:20:30 CEST 2007


Hi!
Could someone give advise on how to plot Greek letters where subscript 
text is picked from the names of a data.frame.
I want what appears using this code
mtext(expression(mu["Mountain"]),side=2,at=max(y)-7,las=1,cex=1.5)

but I would like to do it using something like this:
mtext(expression(mu[colnames(PresEsts)[2]]),side=2,at=max(y)-15,las=1)

BTW,
colnames(PresEsts)[2]
[1] "Mountain"

Thanks!

/Tord

-- 

Tord Snäll
Department of Ecology
Swedish University of Agricultural Sciences (SLU)
P.O. 7002, SE-750 07 Uppsala, Sweden
Office/Mobile/Fax
+46-18-672612/+46-730-891356/+46-18-673537
E-mail: tord.snall at nvb.slu.se
www.nvb.slu.se/staff_tordsnall



More information about the R-help mailing list