search for: orlibrari

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

Did you mean: orlibrary
2013 Jul 23
0
Function apply
Hi, Try: set.seed(25) X<- matrix(sample(1:50,3*140,replace=TRUE),nrow=140) #either res1<-do.call(rbind,lapply(split(as.data.frame(X),((seq_len(nrow(X))-1)%/%10)+1),function(x) apply(x,2,mean))) #or ?res2<-t(sapply(split(as.data.frame(X),((seq_len(nrow(X))-1)%/%10)+1),colMeans)) ?identical(res1,res2) #[1] TRUE #orlibrary(itertools) it<-ihasNext(isplitRows(X,chunkSize=10))