[R] How to get a degree sign into a lattice factor level?
Deepayan Sarkar
deepayan at stat.wisc.edu
Tue Nov 12 05:21:09 CET 2002
On Monday 11 November 2002 07:04 pm, Sonam Lodro wrote:
> I notice that expressions can be used in legends, but as far as I can
> tell, cannot be used as levels for factors. I'd like to be able to do
> something like that so that the levels printed in a lattice plot show
> the degree character.
Try something like
xyplot(rnorm(100) ~ rnorm(100) | gl(2, 50),
strip = function(factor.levels, ...) {
strip.default(factor.levels = expression(1 * degree, 2 * degree),
...)
})
Deepayan
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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