Counting the rows in a data frame based on integer ranges
<p>I have a data frame that lists a bunch of objects and their values.</p>

<pre><code>             Name NumCpu MemoryMB
1 BEAVERTN-SVR-C5      1     3072
2 BEAVERTN-SVR-UK      4     4096
3 BEAVERTN-SVR-JV      1     1024
</code></pre>

<p>I want to take my data frame and create a new column that groups these numbers by ranges.</p>

<pre><code>Ranges: 0-1024, 1025-2048, 2049-4096
</code></pre>

<p>And then output the counts of those ranges into a new data frame:</p>

<pre><code>Range     Count
   0-1024     1
1025-2048     0
2049-4096     2
</code></pre>

<p>I learn by doing, so this is a real work problem I'm trying to use R to solve. Any help greatly appreciated. Thank you!</p>

<p>Data</p>

<pre><code>DF &lt;- structure(list(Name = c("BEAVERTN-SVR-C5", "BEAVERTN-SVR-UK", 
"BEAVERTN-SVR-JV"), NumCpu = c(1L, 4L, 1L), MemoryMB = c(3072L, 
4096L, 1024L), Range = structure(c(3L, 3L, 1L), .Label = c("(0,1.02e+03]", 
"(1.02e+03,2.05e+03]", "(2.05e+03,4.1e+03]"), class = "factor")), .Names = c("Name", 
"NumCpu", "MemoryMB", "Range"), row.names = c("1", "2", "3"), class = "data.frame")
</code></pre>