title: Return multiple values from a function
body: <p>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:</p>
  
  <pre><code>doEverythingFunction &lt;- 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)
  }
  </code></pre>
  
  <p>This function only returns value Z and not X and Y. How can I get it to return all three values? </p>