title: R Programming issue intervals
body: <p>I'm trying to figure out a formula to be able to divide the max and min number inside the intervals.</p>
  
  <pre><code>x &lt;- sample(10:40,100,rep=TRUE)
  factorx&lt;- factor(cut(x, breaks=nclass.Sturges(x)))
  xout&lt;-as.data.frame(table(factorx))
  xout&lt;- transform(xout, cumFreq = cumsum(Freq), relative = prop.table(Freq))
  </code></pre>
  
  <p>Using the above code in the R editor program, I get the following:</p>
  
  <pre><code>xout
        factorx Freq cumFreq relative
  1 (9.97,13.8]   14      14     0.14
  2 (13.8,17.5]   13      27     0.13
  3 (17.5,21.2]   16      43     0.16
  4   (21.2,25]    5      48     0.05
  5   (25,28.8]   11      59     0.11
  6 (28.8,32.5]    8      67     0.08
  7 (32.5,36.2]   16      83     0.16
  8   (36.2,40]   17     100     0.17
  </code></pre>
  
  <p>What I want to know is if there is a way to calculate the interval. For example it would be:</p>
  
  <pre><code>(13.8 + 9.97)/2
  </code></pre>
  
  <p>It's called the class midpoint in statistics I believe. </p>