[R] Multiple assignments in one statement

Jeffrey Horner jeff.horner at vanderbilt.edu
Fri Jul 8 21:45:11 CEST 2005

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();

Jeffrey Horner       Computer Systems Analyst         School of Medicine
615-322-8606         Department of Biostatistics   Vanderbilt University

More information about the R-help mailing list