search for: ihasnext

Displaying 3 results from an estimated 3 matches for "ihasnext".

Did you mean: hasnext
2010 Jan 14
0
itertools 0.1-1
...he "itertools" package is strongly inspired by the Python itertools module, and includes a number of functions of the same name. There are a variety of functions that create iterators for splitting, chunking, repeating, recycling, zipping, and filtering your data. There is also an "ihasNext" function, written by Hadley Wickham, that adds a "hasNext" method to any iterator, making it easier to get values from an iterator without the use of the "foreach" function. Hadley also contributed some utility functions for writing your own iterators. - Steve Weston __...
2010 Jan 14
0
itertools 0.1-1
...he "itertools" package is strongly inspired by the Python itertools module, and includes a number of functions of the same name. There are a variety of functions that create iterators for splitting, chunking, repeating, recycling, zipping, and filtering your data. There is also an "ihasNext" function, written by Hadley Wickham, that adds a "hasNext" method to any iterator, making it easier to get values from an iterator without the use of the "foreach" function. Hadley also contributed some utility functions for writing your own iterators. - Steve Weston __...
2013 Jul 23
0
Function apply
...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)) ?while(hasNext(it)){ ?print( apply(nextElem(it),2,mean)) ?} #[1] 23.4 29.1 31.5 #[1] 28.2 21.8 17.2 #[1] 14.3 24.3 36.4 #[1] 22.2 25.2 24.2 #[1] 28.5 22.6 27.3 #[1] 19.6 25.6 20.0 #[1] 25.7 16.3 27.9 #[1] 20.0 24.8 26.7 #[1] 26.3 30.0 33.0 #[1] 21.9 24.0 32.3 #[1] 25.6 2...