## class "DayWeekCycle"
dwcycle <- BuiltinCycle(7) # new("DayWeekCycle")
unitSeason(dwcycle)
unitCycle(dwcycle)
allSeasons(dwcycle)
dwcycle[] # same
allSeasons(dwcycle, abb = TRUE)
dwcycle[ , abb = TRUE] # same
dwcycle[2]
dwcycle[2, abb = TRUE]
seqSeasons(dwcycle)
## start the week on Sunday
dws <- BuiltinCycle(7, first = 7) # new("DayWeekCycle", first = 7)
dws[1] # "Sunday"
allSeasons(dws)
## class "Every30MinutesCycle"
cyc48 <- BuiltinCycle(48) # new("Every30MinutesCycle")
nSeasons(cyc48)
allSeasons(cyc48)
## class "FiveDayWeekCycle" is deprecated, use the equivalent:
fdcycle <- BuiltinCycle(5)
unitSeason(fdcycle)
unitCycle(fdcycle)
allSeasons(fdcycle)
fdcycle[] # same
allSeasons(fdcycle, abb = TRUE)
fdcycle[ , abb = TRUE] # same
fdcycle[2]
fdcycle[2, abb = TRUE]
seqSeasons(fdcycle)
## class "MonthYearCycle"
mycycle <- BuiltinCycle(12) # new("MonthYearCycle")
unitSeason(mycycle)
unitCycle(mycycle)
allSeasons(mycycle)
mycycle[ ] # same
allSeasons(mycycle, , abb = TRUE)
mycycle[ , abb = TRUE] # same
mycycle[2]
mycycle[2, abb = TRUE]
seqSeasons(mycycle)
## class "OpenCloseCycle"
opcycle <- new("OpenCloseCycle")
unitSeason(opcycle)
unitCycle(opcycle)
allSeasons(opcycle)
opcycle[ , abb = FALSE] # same
allSeasons(opcycle, abb = FALSE)
opcycle[] # same
opcycle[2]
opcycle[2, abb = TRUE]
seqSeasons(opcycle)
## class "QuarterYearCycle"
qycycle <- new("QuarterYearCycle")
unitSeason(qycycle)
unitCycle(qycycle)
allSeasons(qycycle)
qycycle[] # same
allSeasons(qycycle, abb = TRUE)
qycycle[ , abb = TRUE] # same
qycycle[2]
qycycle[2, abb = TRUE]
seqSeasons(qycycle)
Run the code above in your browser using DataLab