title: How to plot a function curve in R
body: <p>What are the alternatives for drawing a simple curve for a function like</p>
  
  <pre><code>eq = function(x){x*x}
  </code></pre>
  
  <p>in R?</p>
  
  <p>It sounds such an obvious question, but I could only find these related questions on stackoverflow, but they are all more specific</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/18162400/plot-line-function-in-r">Plot line function in R</a></li>
  <li><a href="https://stackoverflow.com/questions/1853703/plotting-functions-on-top-of-datapoints-in-r">Plotting functions on top of datapoints in R</a> </li>
  <li><a href="https://stackoverflow.com/questions/20109257/how-can-i-plot-a-function-in-r-with-complex-numbers">How can I plot a function in R with complex numbers?</a></li>
  <li><a href="https://stackoverflow.com/questions/18737357/how-to-plot-a-simple-piecewise-linear-function">How to plot a simple piecewise linear function?</a></li>
  <li><a href="https://stackoverflow.com/questions/4049674/draw-more-than-one-function-curves-in-the-same-plot">Draw more than one function curves in the same plot</a></li>
  </ul>
  
  <p>I hope I didn't write a duplicate question.</p>