Displaying 1 result from an estimated 1 matches for "tp24717178p24719544".
2009 Jul 29
1
Subtract matrices within arrays along indices
I have the following array: 3 dimensional object, one dimension being year.
Object is 3*3*3
library(plyr, reshape)
a1<-rep(c(2007,2008,2009),9)
a2<-c(rep("a",9),rep("b",9),rep("c",9))
a3<-c(rep(c(rep(1,3),rep(2,3),rep(3,3)),3))
a4 <- rnorm(27)
A<-data.frame(cbind(comp=a2,val=a3, year=a1, a4))
A1<-melt(A, id=c("year", "comp",