Skip to content
Prev 247632 / 398503 Next

Counting dates in arbitrary ranges

----------------------------------------
well, with POSIXct I guess you could do things like this, 
( not sure about POSIXct vs Date but maybe someone would comment.
I tried to remove my typos( note that you left out an as.Date in the cut cmd too etc), 
leaving in informative error messages,
?but this is just a dump of what I tried. I would think the "rx" thing
at the bottom would be of use to you,
List of 2
?$ x:Class 'Date'? num [1:864] 13634 13635 13636 13637 13638 ...
?$ y:Class 'Date'? num [1:881] 13680 13681 13682 13683 13684 ...
?POSIXct[1:864], format: "2007-04-30 19:00:00" "2007-05-01 19:00:00" ...
[1] 864
[1] 497
?POSIXct[1:1], format: "2008-05-01 12:34:56"
?int [1:31521601] 1209663296 1209663297 1209663298 1209663299 1209663300 
301 1209663302 1209663303 1209663304 1209663305 ...
[1] 31521601
Error in as.POSIXct.numeric(rx[10]) : 'origin' must be supplied
[1] "2008-05-01 18:35:05 CDT"