Return Various Periods from a Chron or Dates Object
Given a chron or dates object, extract the year, quarter, month, day (within the month) or weekday (days within the week) of the date it represents.
days(x) weekdays(x, abb = TRUE) months(x, abb = TRUE) quarters(x, abb = TRUE) years(x)
- a dates object.
- should abbreviated names be returned? Default is
- an ordered factor corresponding to days, weekdays, months, quarters,
or years of
xfor the respective function.
dts <- dates("07/01/78") + trunc(50 * rnorm(30)) plot(weekdays(dts)) plot(months(dts))
Looks like there are no examples yet.