[R] Processing calendar dates with R

Gabor Grothendieck ggrothendieck at myway.com
Fri Dec 5 15:08:25 CET 2003


There are two datetime systems available.  

1. The POSIXt system in the R base, encompassing the 
POSIXlt and POSIXct classes. Others have already described 
where to get info on these.

2. The Bell Labs chron package.  Info available at:
require(chron)
?chron
You may also find this article on chron useful:
http://cm.bell-labs.com/cm/ms/departments/sia/dj/papers/chron.pdf

A key difference between the two, aside from the specific names and
arguments of the functions involved, is that POSIXt works 
with timezones and with daylight savings time whereas chron 
does not.  I personally use chron for all my stats problems
in order to avoid introducing certain subtleties of timezones
and daylight savings times.  I use POSIXt when I need to 
manipulate time stamps of files from the operating system since
POSIXt provides a close fit to how operating systems handle dates
and time.  Based on books and documentation for R I believe
that most people use POSIXt.

---
Date: Fri, 5 Dec 2003 10:40:29 +1100 
From: john byrne <j.byrne at mackillop.acu.edu.au>
To: <r-help at stat.math.ethz.ch> 
Subject: [R] Processing calendar dates with R 

 
 




I am a beginner in R with a background in SAS.

Are there built-in R methods of reading dates for calculating elapsed days
between two calendar dates? If so, are there any examples I can browse?

Thanks in anticipation.

John Byrne.
Lecturer in Information Systems.
Australian Catholic University.

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help




More information about the R-help mailing list