[R-SIG-Finance] re-indexing data under the zoo package
Stefan Grosse
singularitaet at gmx.net
Mon Feb 28 19:05:34 CET 2011
Am 28.02.2011 18:36, schrieb Aidan Corcoran:
>> head(dq)
> sphsxs eunrfi irhont
> 1995(1) 670.8 82.9 NA
> 1995(2) 686.0 82.9 NA
> 1995(3) 682.6 83.0 NA
> 1995(4) 692.7 82.7 NA
> 1996(1) 686.0 81.5 33.6
> 1996(2) 697.8 82.0 34.6
>
>> dq/dq[index(dq)==1996.00]
> sphsxs eunrfi irhont
> 1996 1 1 1
dq2<-zooreg(t(t(dq)/as.numeric(dq[index(dq)==1996.00]))*100,start=c(1995,1),frequency=4)
Stefan
More information about the R-SIG-Finance
mailing list