Skip to content

Multiple assignments in one statement

2 messages · Jeffrey Horner, Gabor Grothendieck

#
Is this possible?

For instance, I have a function that returns a vector length 3. In one 
statement I'd like to assign each element of the vector to different 
variables. Syntactically, I hoped this would work:

c(x,y,z) <- myfun();

Thanks,
#
Check out:
http://tolstoy.newcastle.edu.au/R/help/04/06/1430.html
http://tolstoy.newcastle.edu.au/R/help/04/06/1406.html
On 7/8/05, Jeffrey Horner <jeff.horner at vanderbilt.edu> wrote: