Hi,
I have an xts dataframe called a1. ?Its tick data for many months. ?The data is already in xts format so the first column is the index.
I reviewed the xts manual and on page 5 of the xts package manual it talks about extracting recurring times between 8:30 to 15:00 using the code ?.parseISO8601('T08:30/T15:00')
My objective is to assign names to certain recurring times such as to call the ticks prior to 9:30 "premarket" so obviously it's to work on a certain hour across all dates
It wasn't clear from the manual's example above how to construct the code so I tried the following and none worked:-
premkt <- a1 [.parseISO8601('T06:30/T9:30'),] ?## used the example supplied by the manual to specify the rows I want from my dataframe
premkt <-?.parseISO8601(a1,'T06:30/T9:30') ?## again I wasn't sure how to use the example in the package so I tried to use the time bracket as an argument for a parseISO8601 function with my dataframe as the first argument
also tried ?premkt <-?a1['T06:30/T9:30' ] ?## I saw a question by someone in which such or similar code was used.
Thanks for the help in advance!!
.
extract a particular hour of tick data from multiple days form xts object
2 messages · Muhammad Abuizzah, Brian G. Peterson
On Wed, 2011-09-28 at 16:36 -0700, Muhammad Abuizzah wrote:
premkt <- a1['T06:30/T9:30' ]
premkt <- a1['T06:30/T09:30' ] the ISO 8601 format is very particular.
Brian G. Peterson http://braverock.com/brian/ Ph: 773-459-4973 IM: bgpbraverock