title: Interpolate density using a number of points instead of random sampling
body: <p>When R calculates density(x) it uses n = 512 (I believe) so it randomly tries to pick 512 points and interpolates a density function using those points. I have a list of points (p) that I would like to use when computing density(x) INSTEAD of randomly sampling 512 points. (ignore any complications this may cause, validity, etc. - I am just looking for a way to implement this)</p>
  
  <ol>
  <li>Is there a way to modify density(x) so I can pass a list
  of points instead of using random sampling? </li>
  <li>What is the algorithm that density(x) uses? </li>
  <li>Is there a different function that I should use for my purposes?</li>
  </ol>