In python you can do something like this:
x,y = 1,2
or
x,y = function_that_returns_two_elements()
I was trying to do something similar in R but found no solution. Is it possible?
In python you can do something like this:
x,y = 1,2
or
x,y = function_that_returns_two_elements()
I was trying to do something similar in R but found no solution. Is it possible?
On
The zeallot package offers an unpacking operator, %<-%
library(zeallot)
z <- list(1:3, 6:9)
c(a, b) %<-% z
a
# 1 2 3
b
# 6 7 8 9
We can use multiple assignment operator (
%=%) for this-output
If it should be unquoted
-output