unpack.Rd
The syntax c[...] = values
unpacks the vector or list values
into as many separate variables, specified as ...
, as there are
items.
c[...] = values
... | the variable names to assign to |
---|---|
values | the vector or list to unpack |
The number of names in ...
must match length(values)
. If there
are too few or too many names, an error is raised.
An exception is made when the last name in ...
is an index-less
subset expression, i.e. name[]
. In that case, the first N-1
elements from values
are assigned to the first N-1 variable
names, and the remaining elements are assigned to name
.