Re: [R] pretty for date-time?

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Thu 07 Jul 2005 - 07:44:47 EST

davidr@rhotrading.com wrote:
> pretty() works well for numbers and axTicks() can help for potting log axes,
> but has anyone written a pretty for chron objects (or other date or date-time classes)?
> It would have natural units of years, months, .., days, hours, (minutes?), and
> it would choose the appropriate unit based on the date(time) range.
> I have searched the archives and documentation to no avail.
> (I wrote one of these back in my Fortran days, and it was non-trivial, even just for dates.)

I don't think it exists (but you never know if it is in a contributed package on CRAN). However, there are methods for the generic axis() function that work on Date and POSIXct objects. (See ?axis.Date for details).

Do these do enough for you, or do you want some of the other options pretty() offers?

Duncan Murdoch

>
> If no-one has done it, I would be willing to work with someone more expert on production quality R to produce it.
>
> Thanks for any pointers,
>
> David L. Reiner
>
> Rho Trading
> 440 S. LaSalle St.
> Chicago IL 60605
> 312-362-4963
>
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jul 07 07:51:28 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:18 EST