Skip to content
Prev 5410 / 7420 Next

raremax value >2, cannot run rarefy

I cannot reproduce anything of this. I cannot see your csv files, and cannot reproduce the analysis. I can see one attached file (raremax.txt) that has a structure that you call "data". When I use that in place of patp (that I don't have), everything runs smoothly. I have no idea what were the warnings you got -- did you use warnings() to see them like the output suggested? Were those warnings? Did they give any useful hints?

A few words about the extremes you drove rarefy: if you rarefy your community to one individual, you will have one species (and  no error), and if you rarefy to zero individuals have zero species. It never occurred to me to test the function with these absurd values. It is nice to see that zero species with zero error was correctly returned. However, it seems that with rarefaction to one individual the number of species (1) was correctly reported, but the function tried to estimate the standard error in vain with some numerical problems: the standard error should be zero exactly, but the function found zero numerically (about plus/minus 0.00000003), and when this numerical zero was negative, you got a warning of taking square root of negative values of magnitude sqrt(-1e-16).

You cannot meaningfully rarefy to one individual. The lowest you can do meaningfully is to rarefy to two individuals. You cannot meaningfully ask how many species you have if you have nothing (zero), or if you only have one individual (one). Think about it.

Cheers, Jari Oksanen