I am familiar with the xts subsetting abilities. However, I can\'t find an elegant way to subset a parameterized range of dates. something like this:
<
For those who are racking their brain to do this for non Posix. Especially for quarter based data i.e. 2001 Q2 to 2006 Q3.
I used a simple yet elegant solution:
library(xts)
starting.quarter<-"200101"
ending.quarter<-"201702"
oil_price_by_qtr<-oil_price_by_qtr[paste(starting.quarter,ending.quarter,sep="/")]
And this will subset the XTS object from 2001 Q1 to 2017 Q2.
May this help some other poor soul avoid losing 2 hours of his life.