spPrevalence: Get the species' prevalence from a binary community matrix.

Description Usage Arguments Value Author(s) Examples

Description

Given a community matrix, the function give out a vector with the prevalence of each species in the data.

Usage

1
spPrevalence(commMatrix, relative=TRUE)

Arguments

commMatrix

Matrix. Community matrix (species by sites) with binary (presence/absence) data.

relative

Logical value. This value indicate if the prevalence should be absolute (number of presences) or relative (percentage of presences).

Value

The output is a vector with one element for each species in the community matrix (commMatrix). It can be total prevalence or relative prevalence of each species.

Author(s)

Diego Nieto Lugilde

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (commMatrix) 
{
    sP <- colSums(commMatrix)
    return(sP)
  }

dinilu/paleoCLMs-package documentation built on May 15, 2019, 8:46 a.m.