Full_Name: Alec Stephenson Version: 1.6.0 OS: linux Submission from: (NULL) (148.88.138.5) Appears to be a sign error in as.POSIX(lt/ct)> library("chron")The following is fine, with default origin.> tmp <- chron(1:2, origin = c(1,1,1970)) > as.POSIXlt(tmp)[1] "1970-01-02 01:00:00 GMT" "1970-01-03 01:00:00 GMT" These are not.> tmp <- chron(1:2, origin = c(1,1,1960)) > tmp[1] 01/02/60 01/03/60> as.POSIXlt(tmp)[1] "1980-01-03 GMT" "1980-01-04 GMT"> tmp <- chron(1:2, origin = c(1,1,1990)) > tmp[1] 01/02/90 01/03/90> as.POSIXlt(tmp)[1] "1950-01-02 GMT" "1950-01-03 GMT"> version_ platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 1 minor 6.0 year 2002 month 10 day 01 language R -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
a.stephenson@lancaster.ac.uk writes:> Full_Name: Alec Stephenson > Version: 1.6.0 > OS: linux > Submission from: (NULL) (148.88.138.5) > > > Appears to be a sign error in as.POSIX(lt/ct) > > > library("chron") > > The following is fine, with default origin. > > > tmp <- chron(1:2, origin = c(1,1,1970)) > > as.POSIXlt(tmp) > [1] "1970-01-02 01:00:00 GMT" "1970-01-03 01:00:00 GMT" > > These are not. > > > tmp <- chron(1:2, origin = c(1,1,1960)) > > tmp > [1] 01/02/60 01/03/60 > > as.POSIXlt(tmp) > [1] "1980-01-03 GMT" "1980-01-04 GMT" > > > tmp <- chron(1:2, origin = c(1,1,1990)) > > tmp > [1] 01/02/90 01/03/90 > > as.POSIXlt(tmp) > [1] "1950-01-02 GMT" "1950-01-03 GMT"Right. as.POSIXct.dates subtracts where it should add. Fixed for 1.6.1 (provided it checks out). -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._