Re: [R] multiple expressions in a legend

2009-08-25 Thread Gabor Grothendieck
Try this: plot(0) ix <- as.double(1:3) legend("top", as.expression(lapply(ix, function(i) bquote(r^.(i) On Tue, Aug 25, 2009 at 8:45 AM, Michael Cho wrote: > Hi, > > Trying to do something fairly simple.  I'm trying to get a legend that > combines superscripts with a sequence, like this: > r

[R] multiple expressions in a legend

2009-08-25 Thread Michael Cho
Hi, Trying to do something fairly simple. I'm trying to get a legend that combines superscripts with a sequence, like this: r^2 = 1 r^2 = 2 r^2 = 3 ... Except that r^2 is properly formatted as a superscript. I've been playing with "substitute" and "expression" and can get an individual line to a