[R] Ordering zoo-object by its index

Sergey Goriatchev sergeyg at gmail.com
Thu Jul 9 11:21:22 CEST 2009


Hello everyone,

Say I have zoo object

x.Date <- as.Date("2003-02-01") + c(1, 3, 7, 9, 14) - 1
x <- zoo(rnorm(5), x.Date)
y <- zoo(rt(5, df=2), x.Date)
z <- zoo(rt(5, df=5), x.Date)

Data <- merge(x,y,z)

What should I do to make the latest values appear at the top?

Thank you for your help!

Regards,
Sergey




More information about the R-help mailing list