Skip to content
Prev 8720 / 398502 Next

chron blues

Bernie McConnell <bm8 at st-andrews.ac.uk> writes:
I don't think you're particularly naive...
The root of this seems to be this

Browse[1]> unclass(e1)+c(1.5,1.5)
[1] 3658.5 3658.5
Browse[1]> unclass(e1)+c(1.5)
[1] 3658.5
attr(,"format")
[1] "d/m/y" "h:m:s"
attr(,"origin")
month   day  year 
    1     1  1970 


This is a generic issue, recycling kills attributes:
[1] 2
attr(,"foo")
[1] "bar"
[1] 2 3

I forget whether there's a logic to this, but S-Plus 3.4 is doing the
same thing. Hence, Ops.dates inside chron probably needs fixing.
Specifically at the line

   val <- NextMethod(.Generic)

(original problem:)
..