fHeip {OnomasticDiversity}R Documentation

Calculate the Heip's diversity index

Description

This function obtains the Heip's diversity index introduced by Carlo H. R. Heip. It is a method for quantifying species biodiversity that can be adapted to the context of onomastic.

Usage

fHeip (x, k, n, location, s)

Arguments

x

dataframe of the data values for each species not null (because if you have a sample, there might be species that are not represented).

k

name of a variable which represents absolute frequency for each species.

n

name of a variable which represents total number of individuals.

location

represents the grouping element.

s

vector which represents total number of species.

Details

For a community i, the Heip's diversity index is defined by E_{He} = \frac{2^{H^{\prime}}-1}{S_i-1} where H^{\prime} is the Shannon diversity index and S_i are all species at the community, species richness. This index varies from 0 to 1 and measures how equally the species richness contributes to the total abundance of the community.

In onomastic context, S_i are all surnames in region (\approx community diversity context) i.

Value

A dataframe containing the following components:

location

represents the grouping element, for example the communities / regions.

heip

the value of the Heip's diversity index.

Author(s)

Maria Jose Ginzo Villamayor

References

Heip, C. (1974). A New Index Measuring Evenness. Journal of the Marine Biological Association of the United Kingdom, 54(3), 555–557.

See Also

fMargalef, fMenhinick, fPielou, fShannon, fSheldon, fSimpson, fSimpsonInf, fGeneralisedMean, fGeometricMean.

Examples

library(sqldf)
data(surnamesgal14)
loc <- length(unique(surnamesgal14$muni))


apes2=sqldf('select  muni, count(surname) as ni,
sum(number) as population from surnamesgal14
group by muni;')


result = fHeip (x= surnamesgal14[surnamesgal14$number != 0,],
k="number", n="population", location  = "muni",
s = apes2$ni[1:loc] )
result

data(namesmengal16)
loc <- length(unique(namesmengal16$muni))


names2=sqldf('select  muni, count(name) as ni,
sum(number) as population from namesmengal16
group by muni;')


result = fHeip (x= namesmengal16[namesmengal16$number != 0,],
k="number", n="population", location  = "muni",
s = names2$ni[1:loc] )
result


data(nameswomengal16)
loc <- length(unique(nameswomengal16$muni))


names2=sqldf('select  muni, count(name) as ni,
sum(number) as population from nameswomengal16
group by muni;')


result = fHeip (x= nameswomengal16[nameswomengal16$number != 0,],
k="number", n="population", location  = "muni",
s = names2$ni[1:loc] )
result

[Package OnomasticDiversity version 0.1 Index]