Learn R Programming

rdiversity (version 1.0)

qD_single: Hill number / naive diversity of a single population

Description

Calculates the Hill number (naive diversity) of order q of a single population with given relative proportions.

Usage

qD_single(proportions, q)

Arguments

proportions

vector of mode numeric; contains the relative proportions of different individuals/types in a population.

q

object of class numeric; contains the order of diversity measurement.

Value

Returns the naive divesity of order q.

Examples

Run this code
# NOT RUN {
pop <- sample(1:50, 5)
qD_single(pop, 0)

# }

Run the code above in your browser using DataLab