[R-SIG-Finance] Zoo functions

Dirk Eddelbuettel edd at debian.org
Fri Feb 1 22:03:14 CET 2008


On 1 February 2008 at 20:29, MAB wrote:
| 1) The documentation for the zoo package indicates a function lag.zoo .
| I can't find it when I try to use it or do a help(lag.zoo). I can find all the 
| other zoo functions I tried so far (allthough diff.zoo is missing also).
| 
| Any hints?

Error on your part. The form is function.class, and the .class (here .zoo)
part is ued for internal dispatching of methods to the correct class -- here
zoo.

Do

	> library(zoo)
	> help(lag)

or

	> help(lag, package="zoo")


| 2) What does the following message imply?
| 
| Warning message:
| some methods for "zoo" objects do not work if the index entries in 'order.by' 
| are not unique in: zoo(rval, x.index[i]) 

Two of the letters in zoo stand for 'ordered observations', and zoo expects
these to to (strictly) monotonically increasing. You get by with ties in the
sense that neither the constructor nor the other functions die on you, but
they reserve the right to warn you.  Which happened here.  If you check

	> summary(diff(x.index[i]))

you probably find that the minimum (difference) is not a positive number. You
want it to be one, in most cases.

Dirk

-- 
Three out of two people have difficulties with fractions.



More information about the R-SIG-Finance mailing list