【发布时间】:2019-02-12 11:36:03
【问题描述】:
有没有办法将时间间隔(例如“2018-01-01”到“2019-01-01”)拆分为多个时段/日期?
if breaks = "1 month" then it's c("2018-01-01","2018-02-01", ... )
if breaks = "1 quarter" then it's c("2018-01-01","2018-04-01", ... )
if breaks = "1 half yearly" then it's c("2018-01-01","2018-07-01", ... )
if breaks = "1 year" then it's c("2018-01-01","2019-01-01")
提前致谢。
【问题讨论】:
标签: r time split intervals period