days(x) weekdays(x, abb=T) months(x, abb=T) quarters(x, abb=T) years(x)
TRUE
.
x
for the respective function.
the levels of
days
are the days of the month,
1
through
31
; the
levels of
weekdays
are
Sunday
through
Saturday
; the levels of
months
are
January
through
December
; and the levels of
quarters
are I < II < III < IV if
abb=F
and 1Q < 2Q < 3Q < 4Q
if
abb=T
. The levels of
years
are exactly the years of the dates
in
x
---years in the range of
x
that are not in
x
itself are not
interpolated.
These functions are generic. The default method works on
dates
objects,
bdTimeDate
objects, and other objects that can be coerced to
dates
objects. There are also methods for
timeDate
and
bdTimeDate
objects, which
take weekday and month names and abbreviations from
options(c("time.day.name", "time.day.abb", "time.month.name", "time.month.abb"))
.
# creates a sample dates object of julian dates x <- c(10,11,12,42,44,45,101,102,212,213,214,300) dts <- dates(x) # alternatively, create a sample timeDate object dts <- as(x, "timeDate") # identifies a weekday or month with each julian day weekdays(dts) months(dts) # produces barplot of # of days in x appearing on particular # weekday or month plot(weekdays(dts)) plot(months(dts)) # produces boxplots of julian date by weekday or month plot(weekdays(dts), x) plot(months(dts), x)