lubridateパッケージで月初・月末日を取る
こんなん。
> library(lubridate) > floor_date(as.Date("2017-03-03"), "month") [1] "2017-03-01" > ceiling_date(as.Date("2017-03-03"), "month") - 1 [1] "2017-03-31"
こんなん。
> library(lubridate) > floor_date(as.Date("2017-03-03"), "month") [1] "2017-03-01" > ceiling_date(as.Date("2017-03-03"), "month") - 1 [1] "2017-03-31"