Chris, You sent a lot of emails but I have a question for you: have you read xts manual cover to cover??? > I wish to reduce the series to a > set of samples which lie between 07:00 and 21:00. > d<-xts(1:25, Sys.time() + 1:25)> d [,1] 2011-09-26 11:21:02 1 2011-09-26 11:21:03 2 2011-09-26 11:21:04 3 2011-09-26 11:21:05 4 2011-09-26 11:21:06 5 2011-09-26 11:21:07 6 2011-09-26 11:21:08 7 2011-09-26 11:21:09 8 2011-09-26 11:21:10 9 2011-09-26 11:21:11 10 2011-09-26 11:21:12 11 2011-09-26 11:21:13 12 2011-09-26 11:21:14 13 2011-09-26 11:21:15 14 2011-09-26 11:21:16 15 2011-09-26 11:21:17 16 2011-09-26 11:21:18 17 2011-09-26 11:21:19 18 2011-09-26 11:21:20 19 2011-09-26 11:21:21 20 2011-09-26 11:21:22 21 2011-09-26 11:21:23 22 2011-09-26 11:21:24 23 2011-09-26 11:21:25 24 2011-09-26 11:21:26 25 > d["2011-09-26 11:21:10::2011-09-26 11:21:20"] [,1] 2011-09-26 11:21:10 9 2011-09-26 11:21:11 10 2011-09-26 11:21:12 11 2011-09-26 11:21:13 12 2011-09-26 11:21:14 13 2011-09-26 11:21:15 14 2011-09-26 11:21:16 15 2011-09-26 11:21:17 16 2011-09-26 11:21:18 17 2011-09-26 11:21:19 18 2011-09-26 11:21:20 19 So where's your problem? regards, daniel 2011/9/26 chrisbird > Hi, > > I am in the process of writing a back-tester using blotter, quantmod and > various other libraries but have stumbled across a couple of stumbling > blocks - any help on these would be really appreciated. > > The data in 30 minute O,H,L,C,V over several months. > > Firstly if I have a xts/zoo time-series, is there any simple way of > filtering the series by time? For example I wish to reduce the series to a > set of samples which lie between 07:00 and 21:00. > > Secondly, and more complex, I wish to remove data of each daily period for > which there are less than 7 samples. So, if I only have four 30 minute > samples for today - I wish to remove all samples for today from the series. > I'm guessing that the best way of doing this is to do an aggregate sample > count per day and then somehow filter the original data on this - however I > am unsure how to do this. > > Any help on these issues would be greatly appreciated. > > Thanks, > > Chris. > > -- > View this message in context: > http://r.789695.n4.nabble.com/Filtering-dates-times-from-zoo-xts-series-tp3842937p3842937.html > Sent from the Rmetrics mailing list archive at Nabble.com. > > _______________________________________________ > R-SIG-Finance@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-sig-finance > -- Subscriber-posting only. If you want to post, subscribe first. > -- Also note that this is not the r-help list where general R questions > should go. > [[alternative HTML version deleted]]