days {chron} | R Documentation |
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) ## Default S3 method: weekdays(x, abbreviate = TRUE) ## Default S3 method: months(x, abbreviate = TRUE) ## Default S3 method: quarters(x, abbreviate = TRUE) years(x)
x |
a dates object. |
abbreviate |
should abbreviated names be returned? Default is TRUE .
|
an ordered factor corresponding to days, weekdays, months, quarters,
or years of x
for the respective function.
dts <- dates("07/01/78") + trunc(50 * rnorm(30)) plot(weekdays(dts)) plot(months(dts))