Given a POSIXct date time, how do you extract the first day of the month for aggregation?
library(lubridate) full.date <- ymd_hms(\"2013-01-01 00:00:21\"
first.of.month <- ymd(format(full.date, "%Y-%m-01")) first.of.month [1] "2013-01-01 UTC"