[R] more on date conversion differences in 2.2.1 vs 2.3.1

paul sorenson sourceforge at metrak.com
Sat Aug 12 01:25:10 CEST 2006


With dates I get different results with 2.2.1 and 2.3.1.  From my 
somewhat naive point point of view, the 2.2.1 behaviour seems more sensible.

Running the code below in 2.2.1:
V1
2006-08-01 2006-08-01
               1             1

With 2.3.1 I get:
V1
1154354400 1154440800
         1          1

# testdate.R
t <- read.csv2('testdate.csv', header=FALSE)
t$V1 <- as.POSIXct(t$V1)
print(t)
x <- xtabs(V2 ~ V1, data=t)
print(x)

# testdate.csv
2006-8-1;0;1
2006-8-1;1;1
2006-8-2;0;1
2006-8-2;0;0
2006-8-2;1;1



More information about the R-help mailing list