Re: [R] Question about 'text' (add lm summary to a plot)

From: Thomas Lumley <tlumley_at_u.washington.edu>
Date: Sat 23 Jul 2005 - 03:54:24 EST

On Fri, 22 Jul 2005, Gabor Grothendieck wrote:
>
> I think legend accepts a list argument directly so that could be
> simplified to just:
>
> a<-7
> plot(1)
> L <- list(bquote(alpha==.(a)),bquote(alpha^2+1==.(a^2+1)))
> legend("topleft",legend=L)

Except that it wouldn't then work: the mathematical stuff comes out as text.

> The same comment seems to apply to my prior suggestion about
> as.expression(bquote(...)), namely that one can just write the
> following as text also supports a list argument:

And this doesn't work either: you end up with %+-% rather than the plus-or-minus symbol.

The reason I gave the do.call() version is that I had tried these simpler versions and they didn't work.

         -thomas



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Jul 23 03:58:04 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:57 EST