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

Thomas Lumley tlumley at u.washington.edu
Fri Jul 22 16:34:32 CEST 2005


On Fri, 22 Jul 2005, Dan Bolser wrote:

> On Fri, 22 Jul 2005, Gabor Grothendieck wrote:
>
>> Try as.expression(bquote(...whatever...))
>
> Sob, wimper, etc.

   a<-7
   plot(1)
   legend("topleft",legend=do.call("expression",
                      list(bquote(alpha==.(a)),bquote(alpha^2+1==.(a^2+1)))))

works for me.  The trick is getting the inner calls to bquote 
evaluated, since expression doesn't evaluate its argument.


 	-thomas




More information about the R-help mailing list