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

Valentin Todorov valentin.to at gmail.com
Thu Jul 27 16:28:22 CEST 2006


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



More information about the R-help mailing list