hello I think I've found a bug I don't know if it's a chron bug or a R one. (05/12/05 23:00:00) +1/24 gives (05/12/05 24:00:00) instead of (05/13/05 00:00:00) it looks like the same but it's not because when you get the date of this datetime it says day 12 instead of 13. Please, forward it to the place where this bugs are supposed to be posted. cheers -- View this message in context: http://r.789695.n4.nabble.com/Bug-on-chron-tp2533135p2533135.html Sent from the R help mailing list archive at Nabble.com.
On Thu, Sep 9, 2010 at 11:59 AM, skan <juanpide at gmail.com> wrote:> > hello > > I think I've found a bug > I don't know if it's a chron bug or a R one. > > (05/12/05 23:00:00) +1/24 ?gives > (05/12/05 24:00:00) > instead of > (05/13/05 00:00:00) > it looks like the same but it's not because when you get the date of this > datetime it says day 12 instead of 13. >I can't reproduce such behavior:> library(chron) > x <- chron("05/12/05", "23:00:00") + 1/24; x[1] (05/13/05 00:00:00)> month.day.year(x)$day[1] 13> packageDescription("chron")$Version[1] "2.3-36"> R.version.string[1] "R version 2.11.1 Patched (2010-05-31 r52167)"> win.version()[1] "Windows Vista (build 6002) Service Pack 2" -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com
Something strange. Your example work but... I have a zoo object. I extract its element 21>> index(test[21]) > [1] (05/12/05 23:00:00) > >> index(test[21])+1/24 > [1] (05/12/05 24:00:00) > >Why 24:00 ?>> packageDescription("chron")$Version > [1] "2.3-35" >> R.version.string > [1] "R version 2.11.1 (2010-05-31)"> packageDescription("zoo")$Version[1] "1.7-0" cheers -- View this message in context: http://r.789695.n4.nabble.com/Bug-on-chron-tp2533135p2533194.html Sent from the R help mailing list archive at Nabble.com.
Could this be a case of faq 7.31? where rounding error means that you are seeing a time that is slightly before midnight (but printing shows it at midnight). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of skan > Sent: Thursday, September 09, 2010 10:00 AM > To: r-help at r-project.org > Subject: [R] Bug on chron > > > hello > > I think I've found a bug > I don't know if it's a chron bug or a R one. > > (05/12/05 23:00:00) +1/24 gives > (05/12/05 24:00:00) > instead of > (05/13/05 00:00:00) > it looks like the same but it's not because when you get the date of > this > datetime it says day 12 instead of 13. > > > Please, forward it to the place where this bugs are supposed to be > posted. > > cheers > -- > View this message in context: http://r.789695.n4.nabble.com/Bug-on- > chron-tp2533135p2533135.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting- > guide.html > and provide commented, minimal, self-contained, reproducible code.