Re: [R] POSIXct: subtle difference in representation leads to error for "+"

2014-05-21 Thread Jens Scheidtmann
Dear Jeff, 2014-05-21 9:33 GMT+02:00 Jeff Newmiller : > You did not show us how "x" was created, so we cannot tell whether this > indicates a bug or not. My bet would be that "x' was created in some way > that bypassed the standard POSIXct creation code. > I debugged it, this morning: The probl

[R] POSIXct: subtle difference in representation leads to error for "+"

2014-05-20 Thread Jens Scheidtmann
Dear all, I have had a "weird" problem in R 3.0.2: > x [1] "2006-03-14 12:48:01 CET" "2006-05-02 11:09:48 CEST" > str(x) POSIXct[1:2], format: "2006-03-14 12:48:01" "2006-05-02 11:09:48" > x + 6 Error in unclass(e1) + unclass(e2) : non-numeric argument to binary operator > as.POSIXct(x) + 6 E