Re: [R] A zoo question / problem

2008-08-11 Thread Gabor Grothendieck
Even though there is a "[.zoo", there is no "[.zoo<-" in zoo. For assignments it simply defaults to the ordinary [ for vectors and matrices. Any of these work: window(t1, both.dates)[, both.cols] <- t2[both.dates, both.cols] window(t1, both.dates)[, both.cols] <- window(t2, both.dates)[, both.c

[R] A zoo question / problem

2008-08-11 Thread david.jessop
Hi I'm having a problem using the zoo library and I can't see what I'm doing wrong. For example setting up the data > t1 = zoo (matrix (1:12, nrow = 3), order.by = as.Date (c("2008-08-01","2008-08-02","2008-08-03"))) > colnames (t1) = c ("A", "B", "C", "D") > t2 = zoo (matrix (1:12, nrow = 3), o