tidyverts / tsibble

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

`is_regular_interval` failing to detect regular interval #231

Closed davidtedfordholt closed 3 years ago

davidtedfordholt commented 3 years ago

When I feed tsibbles into is_regular_interval(), I get Error: Detecting a corrupt tsibble object, and please reconstruct with as_tsibble(). This includes a tsibble I just created with regular = TRUE.

Using tsibble 0.9.3 and R 4.0.3

tibble(x = 1:10, y = seq.Date(as.Date('2020-01-01'), by = 'day', length.out = 10)) %>% 
    as_tsibble(index = y, regular = TRUE) %>% 
    is_regular_interval()
earowang commented 3 years ago

Thanks. I removed that misleading error message. The is_regular_interval() expects an interval object instead of tsibble.