[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 22:02:16 CEST 2018


In the following example, the date class shows Inf as NA

> as_date(Inf, origin = '1970-01-01')
[1] NA

This is misleading as is.na() reports incorrectly

> is.na(as_date(Inf, origin = '1970-01-01'))
[1] FALSE

The correct approach here would probably to have an Inf (and -Inf)
*displayed* rather than NA.

	[[alternative HTML version deleted]]



More information about the R-devel mailing list