new to R (vegan) , confused on data format

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.

Species Name Site Diver Diver Diver Diver Diver Diver Diver
MF EK GR CRC CBC CE MS
Slate Pencil Sea Urchin La Loberia 3 3 2 0 2 2 2
Black Urchin La Loberia 0 0 0 0 0 0 0
Green Urchin La Loberia 0 0 0 0 0 0 0
Black Striped Salema La Loberia 1 0 2 3 2 3 2
Tomtate Grunt La Loberia 0 0 2 2 0 0 0

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?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.