Hi
I see a changed behaviour in xts indexed on class Date in the latest
versions, versus 2.
It seems to be related to changes to/from daylight savings time,
happens those weekends.
Is it not intended that class Date be used like this, or is this new
behaviour incorrect?
Giles
Example:
[1] 15423 15424 15425 15426
Package: xts
Type: Package
Title: eXtensible Time Series
Version: 0.8-8
Date: 2012-10-05
Windows 7 64-bit
R version 2.15.2 64-bit
all packages up-to-date
#--------------previously, R 2.13.2 and xts 0.8-2 , showing expected
behaviour -----------------
Hi,
You could try this:
Sys.setenv(TZ="GMT")
a<-as.Date(15423:15426)
x<-xts(seq_along(a),a)
?print(index(x))
#[1] "2012-03-24" "2012-03-25" "2012-03-26" "2012-03-27"
?print(as.numeric(index(x)))
#[1] 15423 15424 15425 15426
A.K.
----- Original Message -----
From: Giles <giles.heywood at cantab.net>
To: r-help at r-project.org
Cc:
Sent: Friday, November 30, 2012 4:32 AM
Subject: [R] xts indexed with Date class
Hi
I see a changed behaviour in xts indexed on class Date in the latest
versions, versus 2.
It seems to be related to changes to/from daylight savings time,
happens those weekends.
Is it not intended that class Date be used like this, or is this new
behaviour incorrect?
Giles
Example:
[1] 15423 15424 15425 15426
Package: xts
Type: Package
Title: eXtensible Time Series
Version: 0.8-8
Date: 2012-10-05
Windows 7 64-bit
R version 2.15.2 64-bit
all packages up-to-date
#--------------previously, R 2.13.2 and xts 0.8-2 , showing expected
behaviour -----------------