[R] Adding text to strip in xYplot
jpoulsen at zoo.ufl.edu
Wed Apr 9 14:39:09 CEST 2008
I have been trying to add an expression to the strips in xYplot to no
avail. For example, in the code below, the text in the strips for each
panel is "Anls" and "Plts". However, I would like it to add "Anls km^2"
and "Plants km^2" with the exponents raised.
I tried resetting the name of my groups in the dataframe before
plotting, but the dataframe only recognized the entire expression (e.g.
expression(paste("Anls", km^2,sep=" ")) and not Anls km2 - which should
not have surprised me.
Any ideas? Thanks for any help you can provide.
dat=as.data.frame(cbind(ycomb, y.up, y.low, rep(x1,2)),stringsAsFactors=F)
with(dat,xYplot(Cbind(ycomb, y.up, y.low)~x1|factor(grp),
data=dat,type="l", method="bands", scales=list(y=list(relation="free"),
More information about the R-help