Pielou: Pielou's evenness index (E')

View source: R/Pielou.R

PielouR Documentation

Pielou's evenness index (E')

Description

Computes Pielou's evenness index on different classes of numeric matrices using a moving window algorithm.

Usage

Pielou(x, window=3, rasterOut=TRUE, np=1, na.tolerance=1.0, cluster.type="SOCK",
 debugging=FALSE)

Arguments

x

input data may be a matrix, a Spatial Grid Data Frame, a RasterLayer or a list of these objects. In the latter case, only the first element of the list will be considered.

window

the side of the square moving window, it must be a odd numeric value greater than 1 to ensure that the target pixel is in the centre of the moving window. Default value is 3.

rasterOut

Boolean, if TRUE the output will be in RasterLayer format with x as template.

np

the type of cluster which will be created. The options are "MPI" (calls "makeMPIcluster"), "FORK" and "SOCK" (call "makeCluster"). Default type is "SOCK".

na.tolerance

a numeric value (0.0-1.0) which indicates the proportion of NA values that will be tolerated to calculate Pielou's index in each moving window over x. If the relative proportion of NA's in a moving window is bigger than na.tolerance, then the value of the window will be set as NA, otherwise Rao's index will be calculated considering the non-NA values. Default values is 1.0 (i.e., no tolerance for NA's).

cluster.type

the type of cluster which will be created. The options are "MPI" (calls "makeMPIcluster"), "FORK" and "SOCK" (call "makeCluster"). Default type is "SOCK".

debugging

a boolean variable set to FALSE by default. If TRUE, additional messages will be printed. For debugging only.

Details

Pielou evenness's index (E') is calculated on a numerical matrix as E' = {{∑_{i=1}^{R} p_i \times log(p_i)}\over{log(R)}}, where R is the total number of categories (i.e., unique numerical values in the considered numerical matrix) and p is the relative abundance of each category. Pielou's evenness represents the ratio between the observed value of Shannon's Index and the value of Shannon's Index if all categories (R) had the same relative abundance.

Value

A numerical matrix with dimension as dim(x).

Note

Linux users need to install libopenmpi for MPI parallel computing. Linux Ubuntu users may try: apt-get update; apt-get upgrade; apt-get install mpi; apt-get install libopenmpi-dev; apt-get install r-cran-rmpi

Microsoft Windows users may need some additional work to use "MPI", see:
https://bioinfomagician.wordpress.com/2013/11/18/installing-rmpi-mpi-for-r-on-mac-and-windows/

Author(s)

Marcantonio Matteo marcantoniomatteo@gmail.com
Martina Iannacito martina.iannacito@inria.fr
Duccio Rocchini duccio.rocchini@unibo.it

References

Pielou, E.C. (1966). The measurement of diversity in different types of biological collections. Journal of Theoretical Biology, 13: 131-144.

See Also

Shannon

Examples

#Minimal example; compute Shannon's index  
a <- matrix(c(10,10,10,20,20,20,20,30,30),ncol=3,nrow=3)
renyi <- Pielou(x=a,window=3)

rasterdiv documentation built on Nov. 24, 2022, 9:07 a.m.