Say I have a function
f <- function(){
return(list(zoo = x, vector = y, integer = z))
}
When I call this function using
result <- f()
Is there a way to explicitly call return variables? Those. I have to call him using
vara <- result$vara
varb <- result$varb
varc <- result$varc
Since if this function returns many types of data (whether it be data frames, zoos, vectors, etc.). The reason I don't want to bind to a data frame is because not all variables are the same length.
source
share