Reputation: 5
I'd like to be able to create a function that returns 3 lists. For instance:
Objects <- function(SetType, 2Type){
1Set <- list()
1Set$type <- SetType
2Set <- list()
2Set$type <- 2Type
3Set <- list()
return(1Set)
return(2Set)
return(3Set)
}
This only returns 1Set.
One option that I can think of is to create 2 functions that simply create 2Set and 3Set and then call upon them in the Objects function, but is there a better way of achieving this?
Upvotes: 0
Views: 1337