Hi, I am trying to label the x-axis of some histograms with the units of measurement. However, when I use, for example:> truehist(Ca, prob=FALSE, col="gray", xlab=expression(paste("Calcium(", mu, eq^-1, ")"))) I get the following message: Error in eval(expr, envir, enclos) : Object "mu" not found Could someone let me know what I'm doing wrong? Many thanks Gav> version_ platform i386-pc-mingw32 arch x86 os Win32 system x86, Win32 status major 1 minor 3.0 year 2001 month 06 day 22 language R Win2000 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Gavin Simpson wrote:> > Hi, > > I am trying to label the x-axis of some histograms with the units of > measurement. > > However, when I use, for example: > > > truehist(Ca, prob=FALSE, col="gray", xlab=expression(paste("Calcium > (", mu, eq^-1, ")"))) > > I get the following message: > > Error in eval(expr, envir, enclos) : Object "mu" not found > > Could someone let me know what I'm doing wrong?truehist (which is in the package MASS !): function( ... ) { eval(xlab) ... So the first line in the body of truehist() causes your problem. You don't need this line in your case, I think. So just create your own function without this line. Maybe the author of the function can help more precisely. Uwe Ligges -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Possibly Parallel Threads
- X-axis labels in histograms drawn by the "truehist" function
- Comparing Variables and Writing a New Column
- Prediction with multiple zeros in the dependent variable
- Fwd: Re: Seeking help with trellis: log scales on xyplot
- help wrapping findInterval into a function