How to assign from a function which returns more than one value?

Still trying to get into the R logic… what is the “best” way to unpack (on LHS) the results from a function returning multiple values? I can’t do this apparently: R> functionReturningTwoValues <- function() { return(c(1, 2)) } R> functionReturningTwoValues() [1] 1 2 R> a, b <- functionReturningTwoValues() Error: unexpected ‘,’ in “a,” R> c(a, … Read more