search for: coercetimeunit

Displaying 1 result from an estimated 1 matches for "coercetimeunit".

2009 Nov 16
0
(Date + difftime) and (POSIXt + difftime) does not use date/time arithmetics (PR#14067)
...e(1, units="hours") [1] "2009-09-09 09:09:10 ICT" Warning message: Incompatible methods ("+.POSIXt", "Ops.difftime") for "+" I inspect the function definition for '+.Date' and 'Ops.difftime'. > `+.Date` function (e1, e2) { coerceTimeUnit <- function(x) { round(switch(attr(x, "units"), secs = x/86400, mins = x/1440, hours = x/24, days = x, weeks = 7 * x)) } if (nargs() == 1) return(e1) if (inherits(e1, "Date") && inherits(e2, "Date")) stop(&quot...