>From: Wacek Kusnierczyk <Waclaw.Marcin.Kusnierczyk_at_idi.ntnu.no>
>Date: Sun, 22 Mar 2009 22:58:49 +0100


>just for fun, you could do this with multiassignment, e.g., using the >(highly experimental and premature!) rvalues:

> source('http://miscell.googlecode.com/svn/rvalues/rvalues.r') >if (TRUE)

>       c(df1, df2) := list(4:8, 9:13)

>    dput(df1)
>    # 4:8
>    dput(df2)
>    # 9:13


-------
Now THAT's what I call an overloaded operator!   ^_^

But seriously: can someone explain to me what's going on in the rvalues.r code? I tried a simple experiment, replacing ":=" with a "colec" in the code, and of course the line

c(df1, df2) colec list(4:8, 9:13)


just gives me a "syntax error" response. Clearly I need a pointer to some documentation about how the colon and equals sign get "special treatment somewhere inside R.

thanks
Carl

______________________________________________
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.

Reply via email to