Difference between revisions of "Diversity index"

From Testiwiki
Jump to: navigation, search
m (Answer)
(Examples)
Line 125: Line 125:
 
transect <- data$Transect
 
transect <- data$Transect
 
q.wiki
 
q.wiki
out <- diversity(amount, species, transect, q.wiki)
+
out <- diversity(amount = amount, species = species, transect = transect, q.div = q.wiki)
 
print(xtable(out), type = 'html')
 
print(xtable(out), type = 'html')
  
Line 131: Line 131:
  
 
</rcode>
 
</rcode>
 +
 +
{{todo|Mikä ihme tässä koodissa on vikana? q.diviä ei muka löydy mutten ymmärrä miksei. Ongelma on diversity-funktiossa, joka on määritelty sivun ensimmäisessä rcodessa. --[[User:Jouni|Jouni]] 00:36, 9 January 2012 (EET)|Teemu Rintala}}
  
 
The data should be given in R format as a list of values in parenthesis, beginning with c:
 
The data should be given in R format as a list of values in parenthesis, beginning with c:

Revision as of 22:36, 8 January 2012



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

+ Show code

Examples

Example 1 to use function

Give your data in R format or leave empty for example data:

Is your data individual data or group abundancies?:

+ Show code

Example 2

Select your data:

Which q values you want to calculate.:
0
1
2
3

+ Show code

TODO: {{#todo:Mikä ihme tässä koodissa on vikana? q.diviä ei muka löydy mutten ymmärrä miksei. Ongelma on diversity-funktiossa, joka on määritelty sivun ensimmäisessä rcodessa. --Jouni 00:36, 9 January 2012 (EET)|Teemu Rintala|}}


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>