[R-SIG-Finance] Order a XTS object by value
Jeff Ryan
jeff.a.ryan at gmail.com
Tue Nov 17 16:06:09 CET 2009
Marco,
xts, like zoo, only represents 'ordered' time series, so the answer is
no. If an xts object could be unordered the rest of the assumptions
made internally and externally for the class would be invalid.
You will need to use as.matrix() or coredata() to allow for re-ordering.
Best,
Jeff
On Tue, Nov 17, 2009 at 5:55 AM, Zanella Marco <marco.zanella at inbox.com> wrote:
> Sirs,
> a simple question about how I can order an XTS object by time series value (return, in my case). Can I do it only via a previous transformation to a matrix object and consequent ordering with classic order() command?
>
> Many thanks.
>
> Marco
>
> PS: for the record I'm trying to run a time window analysis (es top 10 MAX returns,etc...) of funds time series.
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
>
--
Jeffrey Ryan
jeffrey.ryan at insightalgo.com
ia: insight algorithmics
www.insightalgo.com
More information about the R-SIG-Finance
mailing list