[R] Truncating dates (and other date-time manipulations)
jeff.a.ryan at gmail.com
Fri Sep 12 17:53:01 CEST 2008
I'm still not entirely sure I follow the desired usage, as the original post
made no reference to ggplot2, but as Gabor mentioned the yearmon etc stuff
is quite useful.
If you are formatting arbitrary precision dates, take a look at
axTicksByTime in xts. Both xts and quantmod use it for plotting. The core
calculation is from ?endpoints
I think the effect is what you desire --- though the logic of the function
may be more than you want/need. I use it within the package(s) to make
intelligent breaks given the periodicity of the data.
Some examples are at: http://www.quantmod.com http://www.quantmod.com
My presentation slides from July's Rmetrics conference in Switzerland are
posted here: http://www.quantmod.com/Rmetrics2008/
Most of the functions you have written are somewhere within xts already. At
least the functionality is. See the vignette:
View this message in context: http://www.nabble.com/Truncating-dates-%28and-other-date-time-manipulations%29-tp19436962p19458228.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help