seq(as.Date("2020-02-01"), length=12, by="1 month") - 1
[1] "2020-01-31" "2020-02-29" "2020-03-31" "2020-04-30" "2020-05-31" "2020-06-30" "2020-07-31" "2020-08-31" "2020-09-30" "2020-10-31" "2020-11-30" "2020-12-31"
ymd("2020-02-01")+ months(0:12)-days(1)
[1] "2020-01-31" "2020-02-29" "2020-03-31" "2020-04-30" "2020-05-31" "2020-06-30" "2020-07-31" "2020-08-31" "2020-09-30" "2020-10-31" "2020-11-30" "2020-12-31" "2021-01-31"
https://stackoverflow.com/questions/8333838/generate-a-sequence-of-the-last-day-of-the-month-over-two-years