Displaying 1 result from an estimated 1 matches for "lengthlier".
Did you mean:
lengthier
2009 Apr 06
3
how to subsample all possible combinations of n species taken 1:n at a time?
...thout having to calculate
all possible combos. I have tried two methods but both give memory errors at
about 25 taxa.
The expand.grid() method:
n <- 11
toto <- vector("list",n)
titi <- lapply(toto,function(x) c(0,1))
tutu <- expand.grid(titi)
The combn() method (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...