[R-SIG-Finance] date to index

Jeffrey Ryan jeff.a.ryan at gmail.com
Mon Apr 30 20:31:23 CEST 2012


?index

i <- index(X['2010'] )  # gets you all the dates within 2010

See ?.parseISO8601 as well for more details on subsetting

Jeff

On 4/30/12 12:38 PM, "Gordon Erlebacher" <gordon.erlebach at gmail.com> wrote:

>Hi,
>
>I have a xts object. Given a date, how do I get the index into the array?
>Is there a pre-written function?
>
>Thanks,
>
>  Gordon
>
>	[[alternative HTML version deleted]]
>
>_______________________________________________
>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.



More information about the R-SIG-Finance mailing list