Diversity index: Difference between revisions
Jump to navigation
Jump to search
(may work?) |
(→Answer) |
||
Line 99: | Line 99: | ||
cat("Functions loaded.\n") | cat("Functions loaded.\n") | ||
</rcode> | |||
===Examples=== | |||
'''Example 1 to use function | '''Example 1 to use function | ||
Line 135: | Line 121: | ||
<rcode include="page:OpasnetBaseUtils|name:generic|page:Diversity_index|name:answer" variables=" | <rcode include="page:OpasnetBaseUtils|name:generic|page:Diversity_index|name:answer" variables=" | ||
name:wikidata|description:Select your data|type:selection|options:'5/54/Tigre-data.csv';Tigre|default:'5/54/Tigre-data.csv'| | name:wikidata|description:Select your data|type:selection|options:'5/54/Tigre-data.csv';Tigre|default:'5/54/Tigre-data.csv'| | ||
name: | name:wikiq|description:Which q values you want to calculate.|type:checkbox|options:0;0;1;1;2;2;3;3;999;∞|default:0;1;2;999 | ||
"> | "> | ||
library(OpasnetBaseUtils) | library(OpasnetBaseUtils) | ||
Line 146: | Line 132: | ||
transect <- data$Transect | transect <- data$Transect | ||
out <- diversity(amount, species, transect, | out <- diversity(amount, species, transect, wikiq) | ||
print(xtable(out), type = 'html') | print(xtable(out), type = 'html') | ||
Revision as of 21:53, 8 January 2012
Moderator:Jouni (see all) |
This page is a stub. You may improve it into a full page. |
Upload data
|
Question
How to calculate diversity indices?
Answer
Upload your data to Opasnet Base. Use the function diversity to calculate the most common indices.
Actual function diversity
Examples
Example 1 to use function
Example 2
The data should be given in R format as a list of values in parenthesis, beginning with c:
c(3,5,3,5,2,1,3,3,4,2) or equivalently c(0.1,0.2,0.4,0.1,0.2)
where the values are either
- identifiers of the species 1,2,3... in which the individuals belong (one entry per individual), or
- abundancies of species, i.e. proportions of individuals belonging to each species among the whole population (one entry per species).
Rationale
Diversity indices are thoroughly described in Wikipedia.
See also
References
Related files
<mfanonymousfilelist></mfanonymousfilelist>