I would like to be able to select dates from a data frame after or before a specific date. For example using quandl data on Gold prices.
pGold <- read.csv('http://www.quandl.com/api/v1/datasets/BUNDESBANK/BBK01_WT5511.csv?&trim_start=1968-04-01&trim_end=2014-01-08&sort_order=desc', colClasses=c('Date'='Date'))
pGold$asDate <- as.Date(pGold$Date)
head(pGold)
Date Value
1 2014-01-08 1226.50
2 2014-01-07 1237.50
3 2014-01-06 1238.00
4 2014-01-03 1232.25
5 2014-01-02 1219.75
6 2013-12-31 1201.50
plot(pGold[pGold$Date>"2012-01-01",], type="l", main="Price of Gold (USD)"))

You've practically done it.
pGold <- read.csv('http://www.quandl.com/api/v1/datasets/BUNDESBANK/BBK01_WT5511.csv?&trim_start=1968-04-01&trim_end=2014-01-08&sort_order=desc', colClasses=c('Date'='Date'))
plot(subset(pGold,Date>"2012-01-01"),type="l")
gets you:

or if you want ggplot niceness:
ggplot(subset(pGold,Date>"2012-01-01"), aes(x=Date,y=Value))+geom_line()
gets you:

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With