title: r cut dataframe by factors
body: <p>Let's say I have this</p>
  
  <pre><code>+-------+-----+------+
  | Month | Day | Hour |
  +-------+-----+------+
  |     1 |   1 |    1 |
  |     1 |   1 |    2 |
  |     1 |   1 |    3 |
  |     1 |   1 |    4 |
  |     1 |   2 |    1 |
  |     1 |   2 |    2 |
  |     1 |   2 |    3 |
  |     1 |   2 |    4 |
  |     2 |   1 |    1 |
  |     2 |   1 |    2 |
  |     2 |   1 |    3 |
  |     2 |   1 |    4 |
  +-------+-----+------+
  </code></pre>
  
  <p>I would like to <code>cut</code> by month and day factors to have this</p>
  
  <pre><code>+-------+-----+------+-------+
  | Month | Day | Hour | Block |
  +-------+-----+------+-------+
  |     1 |   1 |    1 | [1,2] |
  |     1 |   1 |    2 | [1,2] |
  |     1 |   1 |    3 | [3,4] |
  |     1 |   1 |    4 | [3,4] |
  |     1 |   2 |    1 | [1,2] |
  |     1 |   2 |    2 | [1,2] |
  |     1 |   2 |    3 | [3,4] |
  |     1 |   2 |    4 | [3,4] |
  |     2 |   1 |    1 | [1,2] |
  |     2 |   1 |    2 | [1,2] |
  |     2 |   1 |    3 | [3,4] |
  |     2 |   1 |    4 | [3,4] |
  +-------+-----+------+-------+
  </code></pre>
  
  <p>I thought that maybe using <code>by</code> or <code>tapply</code> could be a way but I cannot figure how.</p>