[R-SIG-Finance] Zoo functions
Dirk Eddelbuettel
edd at debian.org
Mon Feb 4 20:24:01 CET 2008
On 4 February 2008 at 17:35, MAB wrote:
| So do I understand correctly that I should not attempt to use a function
| lag.zoo but should use the function lag after loading the zoo library?
Correct:
> zoo(1:4, order.by=Sys.Date()+0:3)
2008-02-04 2008-02-05 2008-02-06 2008-02-07
1 2 3 4
> zz <- zoo(1:4, order.by=Sys.Date()+0:3)
> zz
2008-02-04 2008-02-05 2008-02-06 2008-02-07
1 2 3 4
> lag(zz)
2008-02-04 2008-02-05 2008-02-06
2 3 4
> lag(zz, -1)
2008-02-05 2008-02-06 2008-02-07
1 2 3
>
Dirk
--
Three out of two people have difficulties with fractions.
More information about the R-SIG-Finance
mailing list