tidyverts / tsibble

Tidy Temporal Data Frames and Tools
https://tsibble.tidyverts.org
GNU General Public License v3.0
527 stars 49 forks source link

odd typing behavior with yearqtr() #298

Closed apsteinmetz closed 1 year ago

apsteinmetz commented 1 year ago

I ran into this while using tidy select functions. is() reports class yearqtr() is not numeric but is double. Numeric type is a superset of double, no?

library(tsibble)
qtr <- yearquarter("2017 Q1")
is.numeric(qtr)
#> [1] FALSE
is.double(qtr)
#> [1] TRUE

Never mind. this is true with base R dates, too.