Re: [R] Strange behaviour of ISOdatetime
Sorry for missing this part of the posting guide. It was indeed a problem with the locales. I have fixed it now. Pedro David Winsemius wrote: My guess is that your two machines have different setting for locale. What does this produce on each of them: sessionInfo()$locale (Note: It would have been part of the information that you were asked to provide per the posting guide.) --- For questions about unexpected behavior or a possible bug, you should, at a minimum, copy and paste the output from sessionInfo() into your message. When mentioning version numbers, always use the full version number, e.g., `2.6.1', not just `2.6', and also mention the platform (Windows, Linux, MacOS X, with their versions). Other potentially relevant details include the locale (type Sys.getlocale() at the R prompt), and whether you installed a pre-compiled binary version of R or compiled it yourself. -- David Winsemius On Feb 10, 2009, at 11:31 AM, Pedro de Barros wrote: Hi All, I am watching a strange behaviour of ISOdatetime. In my work computer, I get NA when I try to do ISOdatetime(1995,03,26,2,0,0) [1] NA But on other dates and/or times (hour) works OK ISOdatetime(1995,03,25,2,0,0) [1] 1995-03-25 02:00:00 GMT In my home computer, I do not have this problem. I am running the same version of R (2.8.1 patched) on both machines, the same version of Gnu Emacs (22.3.1) and the same version of ESS (5.3.10). Both are running Windows XP. Has anyone experienced this before? Pedro __ R-help@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. __ R-help@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. -- View this message in context: http://www.nabble.com/Strange-behaviour-of-ISOdatetime-tp21937395p21955145.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.
[R] Strange behaviour of ISOdatetime
Hi All, I am watching a strange behaviour of ISOdatetime. In my work computer, I get NA when I try to do ISOdatetime(1995,03,26,2,0,0) [1] NA But on other dates and/or times (hour) works OK ISOdatetime(1995,03,25,2,0,0) [1] 1995-03-25 02:00:00 GMT In my home computer, I do not have this problem. I am running the same version of R (2.8.1 patched) on both machines, the same version of Gnu Emacs (22.3.1) and the same version of ESS (5.3.10). Both are running Windows XP. Has anyone experienced this before? Pedro __ R-help@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.
Re: [R] Strange behaviour of ISOdatetime
My guess is that your two machines have different setting for locale. What does this produce on each of them: sessionInfo()$locale (Note: It would have been part of the information that you were asked to provide per the posting guide.) --- For questions about unexpected behavior or a possible bug, you should, at a minimum, copy and paste the output from sessionInfo() into your message. When mentioning version numbers, always use the full version number, e.g., `2.6.1', not just `2.6', and also mention the platform (Windows, Linux, MacOS X, with their versions). Other potentially relevant details include the locale (type Sys.getlocale() at the R prompt), and whether you installed a pre-compiled binary version of R or compiled it yourself. -- David Winsemius On Feb 10, 2009, at 11:31 AM, Pedro de Barros wrote: Hi All, I am watching a strange behaviour of ISOdatetime. In my work computer, I get NA when I try to do ISOdatetime(1995,03,26,2,0,0) [1] NA But on other dates and/or times (hour) works OK ISOdatetime(1995,03,25,2,0,0) [1] 1995-03-25 02:00:00 GMT In my home computer, I do not have this problem. I am running the same version of R (2.8.1 patched) on both machines, the same version of Gnu Emacs (22.3.1) and the same version of ESS (5.3.10). Both are running Windows XP. Has anyone experienced this before? Pedro __ R-help@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. __ R-help@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.
Re: [R] Strange behaviour of ISOdatetime
Have you checked that that time exists in the time zone you are using? From ?ISOdatetime: Note ... Remember that in most timezones some times do not occur and some occur twice because of transitions to/from summer time. What happens in those cases is OS-specific. You could try working out what your system is using as the transition to/from summer time. (If you need to generate times that are 2 hours after midnight, try using ISOdatetime to generate the midnight times and add 2 hours). On my system, all this works fine: ISOdatetime(1995,03,26,2,0,0) [1] 1995-03-26 02:00:00 MST ISOdatetime(1995,03,26,0,0,0) + 2 * 60 * 60 [1] 1995-03-26 02:00:00 MST sessionInfo() R version 2.8.1 (2008-12-22) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] TimeWarp_0.7abind_1.2-0 trackObjs_0.8-0 tap.misc_1.0 [5] bmc.misc_1.0RtTests_0.1-5 -- Tony Plate Pedro de Barros wrote: Hi All, I am watching a strange behaviour of ISOdatetime. In my work computer, I get NA when I try to do ISOdatetime(1995,03,26,2,0,0) [1] NA But on other dates and/or times (hour) works OK ISOdatetime(1995,03,25,2,0,0) [1] 1995-03-25 02:00:00 GMT In my home computer, I do not have this problem. I am running the same version of R (2.8.1 patched) on both machines, the same version of Gnu Emacs (22.3.1) and the same version of ESS (5.3.10). Both are running Windows XP. Has anyone experienced this before? Pedro __ R-help@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. __ R-help@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.