It works well for the title command.  Thanks.

t

--- On Thu, 7/22/10, David Winsemius <dwinsemius@comcast.net> wrote:

From: David Winsemius <dwinsemius@comcast.net>
Subject: Re: [R] , how to express bar(zeta) in main title in boxplot
To: "Peter Ehlers" <ehlers@ucalgary.ca>
Cc: "Marcus Liu" <marcusliu667@yahoo.com>, r-help@r-project.org
Date: Thursday, July 22, 2010, 1:40 PM


On Jul 22, 2010, at 4:24 PM, Peter Ehlers wrote:

> On 2010-07-22 11:44, Marcus Liu wrote:
>> Hi everyone, I am plotting a boxplot with main title as main =
>> bquote(paste(.(ts.ind[s]), ": ", bar(zeta), " Boxplot from 2001 to 2009", sep = "")) but it doesn't work.  The program said they cannot find the function "bar".  Does anyone know how to do it correctly?  Thanks.
>> 
> 
> A reproducible example with the exact error message would
> be good. Anyway, it seems pretty clear what you want and
> one solution is to _not_ use 'main='. For base graphics,
> I usually prefer to add titles with the title() function
> which will work here.
> 
> a <- pi
> boxplot(rnorm(200))
> title(bquote(paste(.(a), ": ", bar(zeta),
>      " Boxplot from 2001 to 2009", sep = "")))
> 
> It seems that setting main=<...> where <...> contains
> bquote() works with plot(), but not with boxplot().

The help page for boxplot does not document a "main" argument, nor is it in the argument list for boxplot.default or its bxp function. The documentation for the "..." argument does not suggest, to me anyway, that main would passed on to other graphical functions.

--
David Winsemius, MD
West Hartford, CT




      
	[[alternative HTML version deleted]]

