title: Convert a vector to density vector in R
body: <p>I have a vector </p>
  
  <pre><code>v = [..., -10, -10, -10, ..., 1, 2, 5, 6, 7, 9, ...]
  </code></pre>
  
  <p>The <code>geom_density</code> plots the histogram of this vector in a smooth fashion, like a density function!</p>
  
  <p>How can I use the <code>auc</code>, area under the curve, function of library <code>MESS</code>, to compute the areas under the curve for the density plot of such vector in a given interval, let say <code>(-1, 3)</code>?</p>