Maybe x <- array(1:3)
for(i in seq_along(x)) { assign(letters[i], x[i]) } but usually there is no need for this kind of thing. Why do you want to do that? Best, Ista On Thu, Mar 14, 2013 at 1:17 PM, Sahana Srinivasan <sahanasrinivasan...@gmail.com> wrote: > HI, I'm looking for a function that does the same as deal() in MATLAB, i,e, > for an array x[1 2 3] > [a,b,c]=x; > such that > a=1, b=2, c=3 > > Does R have any functions similar to this? > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. ______________________________________________ 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.