[Rd] Should seq.Date() return double storage?
Kurt@Horn|k @end|ng |rom wu@@c@@t
Wed Sep 8 08:18:42 CEST 2021
>>>>> Michael Chirico via R-devel writes:
> today <- Sys.Date()
> #  "double"
> typeof(seq(today, by=1, length.out=2))
> #  "integer"
> Clearly minor as it doesn't seem to have come up before (e.g. coercion
> to numeric will happen automatically whenever fractional dates are
> needed); I only noticed because of a test using identical failing:
> seq(today, by=1, length.out=10),
> today + 0:9
> #  FALSE
> It's easy in this case to fix the test using coercion, but this could
> (and did in practice) come up at deeper levels of nesting that become
> more onerous to handle. And using all.equal() comes with its own
> The fix would be easy enough -- at a glance there are two usages of
> .Date(seq.int(...)) in seq.Date() that could be replaced by
Thanks. Can you pls provide a patch for these?
> Mike C
> R-devel using r-project.org mailing list
More information about the R-devel