[R] Modify objects in function

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Thu Jan 31 16:08:23 CET 2013

On Thu, Jan 31, 2013 at 3:00 PM, Simon Zehnder <szehnder at uni-bonn.de> wrote:
> Hi Barry,
> this actually a good idea, to put them together! Probably even creating an object containing both of them. Haven't thought about it before.

 Hadley W asked for implementations of 'unstructuring assignments' the
other day, and I bashed this out to a gist:


 it lets you do:

 (a~b~c) = foo()

and if foo() returns a list with three components it assigns them to
a, b, and c. Equivalent to:

tmp = foo()

whether its any use to your use case or even works properly under all
circumstances or even just serves to obfuscate things is a point for


More information about the R-help mailing list