Re: [Rd] Confusing print method for Inf dates

2015-10-21 Thread Joshua Ulrich
On Wed, Oct 21, 2015 at 4:57 PM, Hadley Wickham wrote: > x <- as.Date(Inf, origin = "1970-01-01") > x > #> [1] NA > str(x) > #> Date[1:1], format: NA > unclass(x) > #> [1] Inf > > It's not clear what the correct behaviour is. The documentation for > ?Date has: "It is intended that the date should

[Rd] Confusing print method for Inf dates

2015-10-21 Thread Hadley Wickham
x <- as.Date(Inf, origin = "1970-01-01") x #> [1] NA str(x) #> Date[1:1], format: NA unclass(x) #> [1] Inf It's not clear what the correct behaviour is. The documentation for ?Date has: "It is intended that the date should be an integer,", which suggests that -Inf and Inf are not valid dates. But