Skip to content
Prev 276089 / 398506 Next

help with means using tail()

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:
Message-ID: <CAAmySGN2jyn2+gkofBxQ_0hAbx_YjSaWsSyptpzTzL7h5WQ9Eg@mail.gmail.com>
In-Reply-To: <1319646816.92077.YahooMailNeo@web161908.mail.bf1.yahoo.com>