Skip to content

help with means using tail()

1 message · R. Michael Weylandt

#
I think a lag() command will work for you -- but a more helpful piece
of advise is probably to use xts or zoo packages rather than the base
ts. Most people find ts very hard to work with and find that all their
difficulties magically go away when they use those classes.

In xts: it would be something like:

mean(tail(rp,9))
mean(lag(tail(rp,9)))

Michael
On Wed, Oct 26, 2011 at 12:33 PM, Iara Faria <iaragohn at yahoo.com.br> wrote: