days(x) weekdays(x, abbreviate = TRUE) months(x, abbreviate = TRUE) quarters(x, abbreviate = TRUE) years(x)
TRUE, abbreviations should be returned for days of the week, month names, or quarters. Default is
xfor the respective function.
daysare the days of the month,
quartersare I < II < III < IV if
abb=Fand 1Q < 2Q < 3Q < 4Q if
yearsare exactly the years of the dates in
x. Years in the range of
xthat are not in
xitself are not interpolated.
These functions are generic.
The default method works on
and other objects that can be coerced to
There are also methods for
timeDate, which take weekday and month names
and abbreviations from
"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 <- as.Date(x, origin="1960-1-1") ## 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)