I have a generic function which I want to get three values from. However it only returns one of the values from the "return" function. My code is structured like this:
doEverythingFunction <- function(x){
"do some esoteric calculations here"
return(valueX)
"do some more esoteric calculations here"
return(valueY)
"do even more esoteric calculations here"
return(valueZ)
}
This function only returns value Z and not X and Y. How can I get it to return all three values?