I want to subset a range of quarterly data held inside an xts object.
I see the documentation says "xts provides facilities for indexing based on any of the current time-based classes. These include yearqtr"
However I have tried the following, which do produce a range of data but not the dates I request.
a = as.xts(ts(rnorm(20), start=c(1980,1), freq=4))
a["1983"] # Returns 1983Q2 - 1984Q1 ?
a["1983-01/"] # Begins in 1983Q2 ?
a["1981-01/1983-03"] # Returns 1981Q2 - 1983Q2 ?
a[as.yearqtr("1981 Q2")] # Correct
a[as.yearqtr("1981 Q1")/as.yearqtr("1983 Q3")] # Does not work