[R] greek letters, text, and values in labels

From: Valentin Todorov <valentin.to_at_gmail.com>
Date: Fri 28 Jul 2006 - 00:28:22 EST


Unfortunately this does not work for lattice graphics. In such case I do something like the following, but I still do not know how to plot Greek letters in the panel titles:

theta <- 2.1
gr <- as.factor(c(1,2))
levels(gr)[1]<-"Group 1"
levels(gr)[2]<-"Group 2"
library(lattice)
print(xyplot(1~1|gr,

    xlab=eval(substitute(expression(paste(theta, " = ", tval)), list(tval=theta))),

    ylab=eval(substitute(expression(paste(theta, " = ", tval)), list(tval=theta))),

    main=eval(substitute(expression(paste("Results for ",theta, " = ", tval)), list(tval=theta))),

    sub=eval(substitute(expression(paste(theta, " = ", tval)), list(tval=theta)))

    ))

best,
valentin



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri Jul 28 00:44:47 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 28 Jul 2006 - 02:21:11 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.