title: Plotting Probability Density / Mass Function of Dataset in R
body: <p>I have a dataset and I want to analyse these data with a probability density function or a probability mass function in R. I used a density function  but it didn't gave me the probability.</p>
  <p>My data are like this:</p>
  <pre><code>&quot;step&quot;,&quot;Time&quot;,&quot;energy&quot;
  1, 22469 , 392.96E-03
  2, 22547 , 394.82E-03
  3, 22828,400.72E-03
  4, 21765, 383.51E-03
  5, 21516, 379.85E-03
  6, 21453, 379.89E-03
  7, 22156, 387.47E-03
  8, 21844, 384.09E-03
  9 , 21250, 376.14E-03
  10,  21703, 380.83E-03
  </code></pre>
  <p>I want to the get PDF/PMF for the <code>energy</code> vector ; the data we take into account are discrete in nature so I don't have any special type for the distribution of the data.</p>