Dear Colleagues,
As a novice I was trying to calculate Shannon diversity index using
diversity function in vegan package and kept having same error message.
Error in sum(..., na.rm = na.rm) : invalid 'mode' of argument
My dataset is from microarray and have abundant missing values, so I
tried labeling them as NA and 0, but still same error message.
Shannon index is negative sum of proportion times log of proportion, so
I put 1 for missing values to avoid log 0, but still same error message.
What do you think I'm missing here?
Many thanks in advance.
Sanghoon Kang.
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html