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(). -Peter Ehlers ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.