Can some please explain the behaviour below, where, with a from date of "20060301", the first element of the resulting sequence of months is March 2006, but with a from date of "20060401", the start date remains March 2006?
> timeBasedSeq('20060301/20120207/m')[1]
[1] "Mar 2006"
> timeBasedSeq('20060401/20120207/m')[1]
[1] "Mar 2006"
> timeBasedSeq('20060501/20120207/m')[1]
[1] "Apr 2006"
> timeBasedSeq('20060601/20120207/m')[1]
[1] "May 2006"
> timeBasedSeq('20060701/20120207/m')[1]
[1] "Jun 2006"
> timeBasedSeq('20060801/20120207/m')[1]
[1] "Jul 2006"
BTW, I am aware that one does get the "right" answer by starting a day later:
> timeBasedSeq('20060401/20120207/m')[1]
[1] "Mar 2006"
> timeBasedSeq('20060402/20120207/m')[1]
[1] "Apr 2006"
EDIT: Here is my sessionInfo()
> sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8
[5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8
[7] LC_PAPER=C LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] xts_0.8-6 zoo_1.7-7
loaded via a namespace (and not attached):
[1] grid_2.15.0 lattice_0.20-6 tcltk_2.15.0 tools_2.15.0