From zengzhenxing at gmail.com  Tue Aug 26 08:05:07 2008
From: zengzhenxing at gmail.com (zengzhenxing at gmail.com)
Date: Tue, 26 Aug 2008 08:05:07 +0200 (CEST)
Subject: [Rd] bug in package chron (PR#12599)
Message-ID: <20080826060507.6FE1B282EFF8@mail.pubhealth.ku.dk>

Full_Name: Zeng, zhenxing
Version: 2.7.1 (2008-06-23)
OS: windows XP
Submission from: (NULL) (158.182.1.30)


Dear Author

I have run into a trouble in using chron package
The data frame: a
       date time_fut expiry_day   bid   ask trade_day
1 2004-09-01 09:45:00    2004-10 12860 12889        38
2 2004-09-01 09:45:01    2004-10 12885 12890        38
3 2004-09-01 09:45:04    2004-10 12883 12887        38
4 2004-09-01 09:45:05    2004-10 12878 12886        38
5 2004-09-01 09:45:06    2004-10 12881 12887        38
6 2004-09-01 09:45:08    2004-10 12881 12882        38
7 2004-09-01 09:45:11    2004-10 12881 12884        38
8 2004-09-01 09:45:12    2004-10 12882 12884        38
9 2004-09-01 09:45:14    2004-10 12882 12883        38

I use the package chron

a$time_fut<-times(a$time_fut)
a$date<-as.Date(a$date)
a$expiry_day<-as.character(a$expiry_day)

any(am$time_fut[2]==(am$time_fut[1]+times("00:00:01")))
the answer: True
 any(a$time_fut[5]==(a$time_fut[4]+times("00:00:01")))
[1] TRUE
any(am$time_fut[4]==(am$time_fut[3]+times("00:00:01")))
the answer: False
But, the right answer should be true

I don't know why, I am using the R version: 2.7.1
attached please find the data.

Thank you

Best wishes



[Rd] bug in package chron (PR#12599)
zengzhenxing at gmail.com