[R] [Q] use of expression() in plot() vs. hist()

Alex Buerkle (cbuerkle@bio.indiana.edu)
Thu, 18 Feb 1999 11:01:12 -0500 (EST)

Date: Thu, 18 Feb 1999 11:01:12 -0500 (EST)
From: Alex Buerkle <cbuerkle@bio.indiana.edu>
To: r-help@stat.math.ethz.ch
Subject: [R] [Q] use of expression() in plot() vs. hist()

In plot() I can get greek symbols into text items without trouble.
However, some of the same commands don't work as I would expect with
hist(). See the example below.

> plot(1:10, 2:11, xlab=expression(paste("scaled", rho)))

---- works as expected, ie. prints the greek rho

> hist(c(0,0,0,0,4,5,6,6,6,8), xlab=expression(paste("scaled", rho)))
Error: Object "rho" not found

---- for kicks I tried sigma, it also was not found

Surprisingly the following worked:
> hist(c(0,0,0,0,4,5,6,6,6,8), xlab=expression(paste("scaled", pi)))

---- works as expected, ie. prints the greek pi

Does anyone have any suggestions for how to get such expressions into
hist()?

thanks, Alex

~^^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
C. Alex Buerkle Ph: 812-855-9018
Jordan Hall 142 Fax: 812-855-6705
Department of Biology
Indiana University
Bloomington, IN 47405 cbuerkle@bio.indiana.edu

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


This archive was generated by hypermail 1.02.