[R-sig-eco] rarefaction not working with the min species number

Stephen Sefick sas0025 at auburn.edu
Tue Apr 24 14:38:28 CEST 2012


I will provide reproducible code if I need to.

All:

I am trying to set up a 1000 pulls of a community data frame for 
calculating richness measures.  I would like to be able to code the 
sample number based on the minimum of all of the samples.  I can do this 
but there is an error:

Error in sample(rep(nm, times = x[i, ]), sample[i]) :
   cannot take a sample larger than the population when 'replace = FALSE'

when using:

rrarefy(L, min(apply(L, 1, sum)))

min is returning the lowest sample abundance of all of the samples.  
rrarefy works if I subtract 5 (arbitrary) from the min(...) statement.  
I am sure that I am missing something simple.
many thanks,

-- 
Stephen Sefick
**************************************************
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**************************************************
sas0025 at auburn.edu
http://www.auburn.edu/~sas0025
**************************************************

Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods.  We are mammals, and have not exhausted the annoying little problems of being mammals.

                                 -K. Mullis

"A big computer, a complex algorithm and a long time does not equal science."

                               -Robert Gentleman



More information about the R-sig-ecology mailing list