ah, that makes perfect sense in the functional programming sense of things. thanks!
On Wed, Aug 14, 2013 at 10:19 PM, Peter Meilstrup <peter.meilst...@gmail.com> wrote: > Not anything that complicated -- your answer is in the R language definition > under 'Subset assignment' and the part in "Function calls" that describes > assignment functions. > > Whenever a call is found on the left side of a `<-`, it is munged by > sticking a "<-" on the function name and pulling out the first argument. So > > my_list$x <- x > > which is syntactically equivalent to > > `$`(my_list, x) <- x > > is effectively transformed into something like: > > my_list <- `$<-`(my_list, x, x) > > The function `$<-` gets its argument from wherever it is found, and returns > a modified version. > > Peter ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel