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

Werner Grundlingh wgrundlingh @ending from gm@il@com
Fri Jun 8 23:21:22 CEST 2018


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]]



More information about the R-devel mailing list