Vegan package treatment of zeros
On Wed, 2013-05-15 at 09:04 -0500, Michael Rentz wrote:
Hello: I have a good size database of plant cover measurements I was running a Shannon Diversity on. I have every cell as a default of "0" if it is not present. The tutorials I have looked at all had blanks in cases of absence. I just wanted some kind of verification that VEGAN will recognize 0s as absent.... I just wanted to make sure I was not inadvertently setting myself up for problems.
Blanks would be interpreted as `NA` in R when you read the data in. Vegan would respect that and most likely fail because of the missing data as not all methods are appropriate when there are `NA` values. Hence a common first step is to replace `NA` with 0. As you have already have this indicated in your file external to R then you won;t need to do this extra step *in* R. How zeros are then treated will depend largely on the method employed and/or the dissimilarity coefficient used, but that is not an R question. A recent posting to the R-Sig-Ecology list by Brian Cade presents some interesting observations on the double zero issue: https://stat.ethz.ch/pipermail/r-sig-ecology/attachments/20130419/114d1e5f/attachment.pl HTH G
Gavin Simpson, PhD [t] +1 306 337 8863 Adjunct Professor, Department of Biology [f] +1 306 337 2410 Institute of Environmental Change & Society [e] gavin.simpson at uregina.ca 523 Research and Innovation Centre [tw] @ucfagls University of Regina Regina, SK S4S 0A2, Canada