[R-SIG-Finance] selecting specific rows from an xts object

Andreas Voellenklee wotuzu17 at gmail.com
Mon Dec 15 15:56:14 CET 2014


Hello Robert,

look at the help page ?indexClass

This should work:

x[.indexhour(x) == 9 & .indexmin(x) == 30 & .indexsec(x)==0]

regards,

Andreas

2014-12-15 15:31 GMT+01:00 Robert Schien <robsch at robsch.eu>:
>
>
> Hello,
>
> I have a questions concerning the xts package.
>
> How can I select rows for specific times from a xts series?
> I know tthat one select a range with the help of "T", for example
> x["T09:30:00/T09:40:00"]
>
> But how can I select only the rows an 09:30:00 ?
> x["T09:30:00/T09:30:00"] does not work. This delivers the
> whole time series.
> x["T09:30:00"] does not work, too. It delivers no rows at all.
>
> So, how can I do, what I want?
> I didn't find anything in the xts documentation.
>
> Thank you in advance.
>
> Greetings
> Robert
>
> _______________________________________________
> R-SIG-Finance at 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]]



More information about the R-SIG-Finance mailing list