title: Solving for the inverse of a function in R
body: <p>Is there any way for <code>R</code> to solve for the inverse of a given single variable function?  The motivation is for me to later tell <code>R</code> to use a vector of values as inputs of the inverse function so that it can spit out the inverse function values.</p>
  
  <p>For instance, I have the function <code>y(x) = x^2</code>, the inverse is <code>y = sqrt(x)</code>.  Is there a way <code>R</code> can solve for the inverse function?</p>
  
  <p>I looked up <code>uniroot()</code>, but I am not solving for the zero of a function.  </p>
  
  <p>Any suggestions would be helpful.</p>
  
  <p>Thanks!</p>