I have never used this before or anything like it! I'm doing an ecology assignment and need to create a "Non-metric dimensional scaling attempts to plot the similarity of sites in two dimensions". I have data of fish surveys from 7 different sites, 7 divers, and roughly 50 species. I keep getting the error that my data must be numerical but I thought it was so I'm not sure how my data should be formatted.
This is what I have entered. Thank you for any assistance!
install.packages()
library("vegan")
data("Book3")
diversity(Book3, index = "shannon")
Please post a snippet of your data so we can confirm whether it is in the right format.
A handy way to supply some sample data is the dput() function. In the case of a large dataset something like dput(head(mydata, 100)) should supply the data we need.
Thanks but that format for the data is not really very useful. Please supply some data in dput() format as suggested above.
Actually now that I look at the code it is not clear where *Book3 is coming from.
When I try
library(vegan)
data("Book3")
Book3
I get
Error: object 'Book3' not found
so it looks like Book3 is not a dataset included with vegan. How are you loading Book3?