Hi Aiden, is this what you wanted?
library(zoo)
dat <- as.matrix(zooreg(matrix(rnorm(18), 6), start=as.Date("2011-01-01"),
frequency=1))
colnames(dat) <- paste("column", 1:3, sep="")
dat
dat1 <- t(apply(dat, 1, function(x) return(x/dat[1,]*100)))
dat1
Thanks,
--
View this message in context:
http://r.789695.n4.nabble.com/re-indexing-data-under-the-zoo-package-tp3328376p3328397.html
Sent from the Rmetrics mailing list archive at Nabble.com.
_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should
go.