Skip to content

Date class shows Inf as NA; this confuses the use of is.na()

2 messages · Greg Minshall, Gabriel Becker

#
Martin, et al.,
storing years as a double makes me worry slightly about
----
[1] 0
----
which is not how one thinks of years (or integers) as behaving.

cheers, Greg

ps -- sorry for the ">" overloading!
#
Greg,

I see what you mean, but on the other hand, that's not how we think about
real numbers working either, and doubles have that behavior generally. It
might be possible to put checks in (with a potentially non-trivial overhead
cost) to disallow that kind of thing, but again R (and everyone else, I
think?) doesn't do so for regular doubles.

Also, I would expect the year 1e50 and the "year" Inf to be functionally
equivalent in meaning (and largely meaningless) in context.

Best,
~G
On Tue, Jun 12, 2018 at 4:23 PM, Greg Minshall <minshall at acm.org> wrote: