[R] data in form of a date

Hans-Peter gchappi at gmail.com
Thu Nov 23 11:09:18 CET 2006


Hi,

2006/11/22, James J. Roper <jjroper at gmail.com>:
> I often use dates and times in analyses.  I just can't figure out how to
> format my date or time column in R.  So, apparently R sees the date as
> something other than date (character).  Let's say I am opening a CSV
> file, one of the columns of which is a date or time.  How do I specify
> that when opening the file?

In the xlsReadWrite*Pro* version I have implemented an oleDateTime
(and oleDate and oleTime) class which works quite nicely with Excel
dates
- info: http://treetron.googlepages.com/
- download zip: http://treetron.googlepages.com/xlsReadWritePro_1.0.5.zip

If you are on windows you might want to try that out. The
xlsReadWritePro version is not free like xlsReadWrite, sorry. But as
you work in ecology I'll send you a free key (if non-free packages are
in principle acceptable for you). Just contact me off list.

In the next version of the free xlsReadWrite package I have at least
implemented that dates will be retrieved as ISO formated date/time
strings. The format is fixed and you are able to convert this to R
date related classes (e.g. chron, date, POSIXt/ct/lt, fCalendar). -
The new xlsReadWrite is finished but not yet uploaded, I just uploaded
it "unofficially":
- bin zip: http://treetron.googlepages.com/xlsReadWrite_1.2.0.zip
- source: http://treetron.googlepages.com/xlsReadWrite_1.2.0.tar.gz

It should be ok, i.e. runs my internal tests, but I want to add some
more tests before official release. New is also that you can specify
rowNames for matrices (and not only data.frame).

Regards,
Hans-Peter



More information about the R-help mailing list