title: Return a par(mfrow) as a result of a function
body: <p>I made a function calculating something and I want to return a <code>par(mfrow)</code> with 3 plots that I calculate inside the function but I don't know how to do that. Out of the function the <code>par(mfrow=c(1,3))</code> followed by the 3 plots works fine. What's the syntax for doing something like that?</p>
  
  <p>My syntax is the following:</p>
  
  <pre><code>myfunction&lt;-function(){
    return(par(mfrow=c(1,3)))
    persp(x,y,z)
    contour(x,y,z)
    image(x,y,z)
  }
  </code></pre>