From wgrundlingh @ending from gm@il@com  Fri Jun  8 23:21:22 2018
From: wgrundlingh @ending from gm@il@com (Werner Grundlingh)
Date: Fri, 8 Jun 2018 14:21:22 -0700
Subject: [Rd] 
 Date class shows Inf as NA; this confuses the use of is.na()
In-Reply-To: <710BDF90-B13A-47CE-980B-9276293C7E45@llnl.gov>
References: <CAGg4omXVJj3vnK1+Z4zaHeuQ5Q+GjsOcvY22D13-okpjzWCsuA@mail.gmail.com>
 <710BDF90-B13A-47CE-980B-9276293C7E45@llnl.gov>
Message-ID: <CAGg4omUa-ZU5hrKzj1a6e154bTOCge_T8kahcwEzFSpPxXG3tg@mail.gmail.com>

Indeed. as_date is from lubridate, but the same holds for as.Date.

The output and it's interpretation should be consistent, otherwise it leads
to confusion when programming. I understand that the difference exists
after asking a question on Stack Overflow:
  https://stackoverflow.com/q/50766089/914686
This understanding is never mentioned in the documentation - that an Inf
date is actually represented as NA:
  https://www.rdocumentation.org/packages/base/versions/3.5.0/topics/as.Date
So I'm of the impression that the display should be fixed as a first option
(thereby providing clarity/transparency in terms of back-end and output),
or the documentation amended (to highlight this) as a second option.

	[[alternative HTML version deleted]]



[Rd] Date class shows Inf as NA; this confuses the use of is.na()
Werner Grundlingh