## Not run:
# # Case 1
# library(lubridate)
# OriginStart = c(mdy("1/1/2000"), mdy("1/1/2000"), mdy("1/1/2001"))
# OriginEnd = c(mdy("12/31/2000"), mdy("12/31/2000"), mdy("12/31/2001"))
#
# OriginPeriods = CreateOriginPeriods(OriginStart, OriginEnd)
# OriginPeriods
#
# # Case 2
# OriginStart = c(mdy("1/1/2000"), mdy("1/1/2000"), mdy("1/1/2001"))
# OriginPeriods = CreateOriginPeriods(OriginStart, OriginLength = months(12))
# OriginPeriods
#
# # Case 3
# OriginStartYear = c(2000, 2000, 2001)
# OriginPeriods = CreateOriginPeriods(OriginStartYear, OriginLength = years(1)
# , StartDay = 1, StartMonth = 1)
# OriginPeriods
# ## End(Not run)
Run the code above in your browser using DataLab