tidyverts / tsibble

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

Fix format.yearquarter() erroring on NA values #170

Closed mitchelloharawild closed 4 years ago

mitchelloharawild commented 4 years ago

The format.Date() function requires that the format argument to be non-missing characters.

library(tsibble)
yq <- vctrs::vec_c(NA, yearquarter("1970 Q1"))
format(yq)
#> Error in if (any(f0 <- format == "")) {: missing value where TRUE/FALSE needed

Created on 2020-03-05 by the reprex package (v0.3.0)