mitchelloharawild / mixtime

Mixed time vectors for R
https://pkg.mitchelloharawild.com/mixtime/
GNU General Public License v3.0
4 stars 0 forks source link

Cannot use tsibble::new_data() with <moment> vectors #2

Closed mitchelloharawild closed 4 years ago

mitchelloharawild commented 4 years ago
library(tsibble)
tsibble(idx = moment::yearmonth(1:3), index = idx) %>% 
  new_data(10)
#> Error: Corrupt x: no names

Created on 2020-10-26 by the reprex package (v0.3.0)

mitchelloharawild commented 4 years ago

MRE: Something seems different to the rcrd class for moments:

library(vctrs)
library(rlang)
vec_c(x = distributional::new_hilo(0,1,95), .name_spec = zap())
#> <hilo[1]>
#> [1] [0, 1]95
vec_c(x = moment:::yearmonth.numeric(1), .name_spec = zap())
#> <moment[1]>
#> Error: Corrupt x: no names

Created on 2020-10-26 by the reprex package (v0.3.0)