powered by
creates a monthly date vector from a date vector
date_ym(x)
date vector
a date
seq.Date(lubridate::ymd(20200101), lubridate::ymd(20220101), length.out = 10) -> d1 d1 %>% tibble::enframe() %>% dplyr::mutate(YM = date_ym(value))
Run the code above in your browser using DataLab