Input Data Must Be Numeric????

First, Hi, please see the FAQ: What's a reproducible example (`reprex`) and how do I create one? Using a reprex, complete with representative data will attract quicker and more answers.

I'll have to guess that you are using diversity() from the vegan package . and that the source delim.txt file and Phylum are the same and contain either a lack of numeric variables or a mix of character and numeric variables.

The function signature requires its argument to be

Community data, a matrix-like object or a vector.

Matrices cannot mix classes--all numeric or all character.

This makes sense when you look at Shannon-Weaver

H = - \sum\limits_{i=1}^S p_i\space log\space p_i

gotta have numbers

2 Likes