Diversity index: Difference between revisions
Jump to navigation
Jump to search
(example code works) |
(explanations added) |
||
Line 37: | Line 37: | ||
<rcode include="page:Diversity_index|name:answer" variables=" | <rcode include="page:Diversity_index|name:answer" variables=" | ||
name:data|description:Give your data in R format | name:data|description:Give your data in R format or leave empty for example data| | ||
name:individual|description:Is your data individual data or group abundancies?|type:selection|options:TRUE;Individual;FALSE;Group|default:TRUE | name:individual|description:Is your data individual data or group abundancies?|type:selection|options:TRUE;Individual;FALSE;Group|default:TRUE | ||
"> | "> | ||
Line 45: | Line 45: | ||
print(xtable(out), type = 'html') | print(xtable(out), type = 'html') | ||
</rcode> | </rcode> | ||
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== | ==Rationale== |
Revision as of 23:20, 4 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
⇤--#: . With the example data, H' shows 0 which is not plausible. What's wrong? --Jouni 01:10, 5 January 2012 (EET) (type: truth; paradigms: science: attack)
Example to use function
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>