Say I have a function
f <- function(){
# do things
return(list(zoo = x, vector = y, integer = z))
}
When I call this function using
result <- f()
Is there any way to call the return variables explicitly? Ie do I have to call it using
vara <- result$vara
varb <- result$varb
varc <- result$varc
Since if this function returns a lot of data types (whether it be data frames, zoo's, vectors, etc). The reason I dont want to bind into data frame is because not all variables are of the same length.
vara=f()$varawill work.