weekdays.zoo {quantmod} | R Documentation |
Extract the minute, hour, day, weekday, month or quarter. This documents the methods
for the zoo class with an index of class Date
, or coercible to such.
## S3 method for class 'zoo': weekdays(x,abbreviate=FALSE) ## S3 method for class 'timeSeries': weekdays(x,abbreviate=FALSE) ## S3 method for class 'zoo': months(x,abbreviate=FALSE) ## S3 method for class 'timeSeries': months(x,abbreviate=FALSE) ## S3 method for class 'zoo': quarters(x,abbreviate=FALSE) ## S3 method for class 'timeSeries': quarters(x,abbreviate=FALSE)
x |
a object with index that inherits Date or POSIXt |
abbreviate |
logical. Should names be abbreviated? |
weekdays
and months
return a character vector of the
names, or for abbreviate=TRUE
a character vector of month
numbers for months.zoo
.
quarters.zoo
returns a numeric vector of 1
to 4
for abbreviate=TRUE
, else a character vector
containing “Q1”,“Q2”,“Q3”, and/or “Q4”
Jeffrey A. Ryan
DateTimeClasses
, quarters
,
weekdays
, months
zoo.data <- zoo(rnorm(31)+10,as.Date(13514:13744,origin="1970-01-01")) weekdays(zoo.data) months(zoo.data) quarters(zoo.data)