search for: loopbi

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

Did you mean: loop_i
2009 Apr 06
3
how to subsample all possible combinations of n species taken 1:n at a time?
...a slightly lengthlier function): samplecommunityD<- function(n,numsamples) { super<-mat.or.vec(,n) for (numspploop in 1:n) { minor<-t(combn(n,numspploop)) if (dim(minor)[1]<numsamples) { minot<-mat.or.vec(dim(minor)[1],n) for (loopi in 1:dim(minor)[1]) { for (loopbi in 1:dim(minor)[2]) { minot[loopi,minor[loopi,loopbi]] <- 1 } } super<-rbind(super,minot) rm(minot) } else { minot<-mat.or.vec(numsamples,n) for (loopii in 1:numsamples) { thousand<-sample(dim(minor)[1],numsamples) for (loopbii i...