function vectors (was Re: [R] text() does not handle lists of expressions)
Tamas Papp
tpapp at axelero.hu
Mon Apr 26 18:26:25 CEST 2004
On Mon, Apr 26, 2004 at 07:50:07AM -0700, Thomas Lumley wrote:
> An expression is already a vector in this sense
> eg
> plot(1:10)
> text(c(4,2),c(2,4),labels=expression(a[1],b[2]))
Thanks (also to Deepayan Sarkar), now I see. I have found
?character-class, and now I see that vectors can have a mode of
"expression", too.
Another (related) question: why aren't there vectors of
mode="function" in R? Are they difficult to implement, not needed,
etc., what is the reason for their abscence? I found that I can make
a vector of functions by using expression and then eval, so there is a
workaround, but I am just curious about this.
Thanks,
Tamas
--
Tamás K. Papp
E-mail: tpapp at axelero.hu
Please try to send only (latin-2) plain text, not HTML or other garbage.
More information about the R-help
mailing list