[prev in list] [next in list] [prev in thread] [next in thread]
List: r-devel
Subject: Re: [Rd] strptime bug (PR#1155)
From: rmh () surfer ! sbm ! temple ! edu
Date: 2001-10-31 22:32:04
[Download RAW message or body]
Where is the strptime bug happening? I am seeing it on W95 W98 W2000
running Rterm under ntemacs 21.1 with ESS 5.1.19 and using cygwin
2001/08/31 15:52:16 Starting cygwin install, version 2.78.2.3
Is strptime using the bash from my system? or is it using functions
that are included with R?
R defaulted to 1900 when I didn't specify a year. The 1990 came from
the help(beav1).
When I explicitly place a year in the file, either the 1990 inidcated
in the help(beav1) file or the 1900 chosen to match the default, then
R gives me times consistent with the input.
> tmp <- beav1[90:93,]
> tmp
day time temp activ
90 346 2340 36.93 0
91 346 2350 36.83 0
92 347 0 36.93 0
93 347 10 36.83 0
> attach(tmp)
> strptime(paste(day, time %/% 100, time %% 100), "%j %H %M")
[1] "1900-01-01 23:40:00" "1900-01-01 23:50:00" "1900-01-01 00:00:00"
[4] "1900-01-01 00:10:00"
> strptime(paste(1900, day, time %/% 100, time %% 100), "%Y %j %H %M")
[1] "1900-12-12 23:40:00" "1900-12-12 23:50:00" "1900-12-13 00:00:00"
[4] "1900-12-13 00:10:00"
> strptime(paste(1990, day, time %/% 100, time %% 100), "%Y %j %H %M")
[1] "1990-12-12 23:40:00" "1990-12-12 23:50:00" "1990-12-13 00:00:00"
[4] "1990-12-13 00:10:00"
>
Rich
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic