I am trying to find the Pearson Correlation Coefficient between accumulative number of a specific genus and accumulative number of species (site-wise). I know I need to use the following code and dataframe like this:
cor.test(df$accumulative_number_of_genus, df$accumulative_number_of_species,
method="pearson", conf.level=0.95)
df
Site | accumulative_number_of_genus | accumulative_number_of_species |
---|---|---|
A | 5 | 9 |
B | 14 | 21 |
C | 30 | 51 |
D | 47 | 70 |
Now I have a datasheet with all single record of species but creating the table is challenging. How can I effectively calculate the number of unique species happen in A, B and C but not in D, and so on?
I have tried to summarise the data in a table but not helping much.
table(rawdata$Site, rawdata$Species)
phyllis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1