title: How to compute frequency distribution in R?
body: <p>Actually there are many functions which I don't know what to use to calculate it</p>
  
  <pre><code>X = rnorm(100)
  </code></pre>
  
  <p>Lets assume I have a normally distributed vector called X. I don't know anything about bin centre and I want to calculate the frequency distribution for X</p>
  
  <p>As an output I want to have one vector of frequency and one vector as bin Centres 
  I think calculating bin centre can be done like </p>
  
  <pre><code>seq(min(mat[,1]),max(mat[,1]), by=0.01 ) 
  </code></pre>
  
  <p>Can you please guide me to calculate it and obtain the needed output? which function I must use ?</p>
  
  <p>example data </p>
  
  <pre><code>0.0014985
  0.0087414
  0.011304
  0.011619
  0.013201
  0.017573
  0.018898
  0.022491
  0.023001
  0.024195
  0.024434
  0.024469
  0.028859
  0.031385
  0.031647
  0.032224
  0.033946
  0.036938
  0.037867
  0.037993
  0.038889
  0.038922
  0.03894
  0.041474
  0.041804
  0.044066
  0.044082
  0.044962
  0.047495
  </code></pre>
  
  <p>With Prism I obtain the following (bin width is 0.05) </p>
  
  <pre><code>bin centres   frequency
      0           1
      0.005       0
      0.01        3
      0.015       1
      0.02        3
      0.025       4
      0.03        4
      0.035       2
      0.04        7
      0.045       4
      0.05        0
  </code></pre>