
I have the following sample tick data set (Z11):
24990  2011-10-31       0421        8900          B
24991  2011-10-31       0421        8900          B
24992  2011-10-31       0421        8900          B
24993  2011-10-31       0421        8900          B
24994  2011-10-31       0421        8900          B
24995  2011-10-31       0421        8900          B
24996  2011-10-31       0421        8900          B
24997  2011-10-31       0421        8900          B
24998  2011-10-31       0421        8900          B
24999  2011-10-31       0421        8900          B

where the second field is the date, third- time, fourth - price, and fifth - bid, ask, or trade

I have converted the above into a xts object using the following command

z<-xts(Z11[,-1],order.by=as.Date(Z11[,1]))

which has resulted in data in the following form 
2011-10-31 "0421"     "8900"      "B"       
2011-10-31 "0421"     "8900"      "B"       
2011-10-31 "0421"     "8900"      "B"       
2011-10-31 "0421"     "8900"      "B"       
2011-10-31 "0421"     "8900"      "B"       
2011-10-31 "0421"     "8900"      "B"       
2011-10-31 "0421"     "8900"      "B"       
2011-10-31 "0421"     "8900"      "B" 

I want to split my data based on the hour of the day,  so I was trying to use the following
z['2011-10-31 04/'] to get the data starting from the 04 hour through the end of the day,

but it returns the following:
z['2011-10-31 04/']
     trade_time trade_price trade_type

can anyone pls. suggest how I can split the data into hourly intervals from this xts object.....thanks!

 		 	   		  
	[[alternative HTML version deleted]]

