day,month cut working but hour cut causing Error in cut.default(as.character(tweet_dat$datetime), breaks = "Hour") : 'x' must be numeric
<p>Hi am trying to cut data into monthly, weekly, daily and hourly sets using the following timestamp data</p>

<pre><code>[1] "2015-12-31 13:54:00 AEDT" "2015-12-30 12:41:00 AEDT" "2015-12-30 07:14:00 AEDT" "2015-12-30 03:07:00 AEDT"
[5] "2015-12-30 02:27:00 AEDT" "2015-12-29 17:09:00 AEDT" "2015-12-29 17:07:00 AEDT" "2015-12-29 16:46:00 AEDT"
[9] "2015-12-29 16:17:00 AEDT" "2015-12-29 15:10:00 AEDT" "2015-12-29 14:22:00 AEDT" "2015-12-29 12:17:00 AEDT"
[13] "2015-12-28 12:45:00 AEDT" "2015-12-28 11:13:00 AEDT" "2015-12-27 21:25:00 AEDT" "2015-12-27 20:25:00 AEDT"
</code></pre>

<p>I used the following to convert from factor to posixlt date format:</p>

<pre><code>td$datetime &lt;- as.POSIXlt(as.character(td$time), format="%Y-%m-%d %H:%M")

str(td)
datetime           : POSIXlt, format: "2015-12-31 13:54:00" "2015-12-30 12:41:00" "2015-12-30 07:14:00" "2015-12-30 03:07:00" ... 
</code></pre>

<p>The following 3 all work fine:</p>

<pre><code># create a column for month time break
td$month &lt;- as.Date(cut(td$datetime, breaks = "month"))

# create a column for weekly time break
td$week &lt;- as.Date(cut(td$datetime, breaks = "week", start.on.monday = FALSE))

# create a column for daily time break
td$day &lt;- as.Date(cut(td$datetime, breaks = "day"))
</code></pre>

<p>but when I do hourly, it doesn't work </p>

<pre><code>td$hour &lt;- as.Date(cut(as.character(td$datetime), breaks = "hour")).
I get the following error
Error in cut.default(as.character(td$datetime), breaks = "Hour") : 
  'x' must be numeric
</code></pre>