[R-SIG-Finance] Selecting a subset of date range

Pete Brecknock Peter.Brecknock at bp.com
Tue Feb 1 22:59:57 CET 2011

... or, if you are wedded to the window() approach, you could use the match
function ....

dat_seq <- seq(as.Date("2000-01-01"), as.Date("2010-01-01"), by="1 day")

window(dat_seq, start= match(as.Date("2000-01-01"), dat_seq),
                        end = match(as.Date("2007-01-01"), dat_seq))



View this message in context: http://r.789695.n4.nabble.com/Selecting-a-subset-of-date-range-tp3252845p3253045.html
Sent from the Rmetrics mailing list archive at Nabble.com.

More information about the R-SIG-Finance mailing list