search for: xtap3

Displaying 1 result from an estimated 1 matches for "xtap3".

Did you mean: tap3
2001 Aug 21
4
looking for a smarter way
...into one matrix. I get the job done, but I would have thought that it could be done in one or two lines, not six, and be generalized so that it didn't matter how many columns I had. Any suggestions? xtap1<-tapply(xcmd[,1],xclu$clustering,var) xtap2<-tapply(xcmd[,2],xclu$clustering,var) xtap3<-tapply(xcmd[,3],xclu$clustering,var) xtap4<-tapply(xcmd[,4],xclu$clustering,var) xtap5<-tapply(xcmd[,5],xclu$clustering,var) xtap<-cbind(xtap1,xtap2,xtap3,xtap4,xtap5) The next example is somewhat similar, but I'm trying to calculate a Shannon-weaver information index for each cl...