title: Cutting POSIXlt types by hour in R
body: <p>Suppose I have the following data</p>
  
  <pre><code>plt &lt;- seq(as.POSIXlt("2010-01-01 01:20:30"), as.POSIXlt("2010-12-31 12:00:30"), 
             length.out = 10)
  df &lt;- data.frame(plt)
  
                     plt
  1  2010-01-01 01:20:30
  2  2010-02-10 13:11:36
  3  2010-03-23 02:02:43
  4  2010-05-02 13:53:50
  5  2010-06-12 01:44:56
  6  2010-07-22 13:36:03
  7  2010-09-01 01:27:10
  8  2010-10-11 13:18:16
  9  2010-11-21 00:09:23
  10 2010-12-31 12:00:30
  </code></pre>
  
  <p>What I am trying to do is cut the following date by time. What I mean is I want to assign an A factor for times between 00:00:00 - 06:00:00, B factor to 06:00:01 - 12:00:00, C factor to 12:00:01 - 18:00:00,D factor to 18:00:01 - 24:00:00. Hoping for the factors to be found in a separate column in <code>df</code>. Anyone have an idea on how to do this?</p>