Description Usage Arguments Details Value References Examples
Assign elements of a list to multiple variable names in current namespace.
1 2 | ## S3 replacement method for class 'result'
x[...] <- value
|
x |
function first argument |
... |
function additional argument |
value |
values to be assigned in parent frame |
This operation mimics the behavior of destructuring-bind
(Lisp), sequence unpacking (Python), and deal
(MATLAB). This R implementation is taken directly from G. Grothendieck's implementation of List
as posted in R-help[1] but renamed as DBind
. While returning multiple values from a function is considered unfunctional, the idea is to compose multiple operations (funciton invocation and subsequent assignment of list contents) into one.
Produces side effect of assigning multiple values in the parent frame.
[1] https://stat.ethz.ch/pipermail/r-help/2004-June/053343.html
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.