occurrence: Co-Occurrence

occurrenceR Documentation

Co-Occurrence

Description

Co-Occurrence

Usage

occurrence(object, ...)

## S4 method for signature 'matrix'
occurrence(object, method = c("absolute", "relative", "binomial"))

## S4 method for signature 'data.frame'
occurrence(object, method = c("absolute", "relative", "binomial"))

Arguments

object

A m \times p numeric matrix or data.frame of count data (absolute frequencies giving the number of individuals for each category, i.e. a contingency table). A data.frame will be coerced to a numeric matrix via data.matrix().

...

Currently not used.

method

A character string specifying the method to be used. It must be one of "absolute", "relative" or "binomial" (see details). Any unambiguous substring can be given.

Details

absolute

Count how many times each pairs of types occur together in at least one sample (absolute frequencies).

relative

Count how many times each pairs of types occur together in at least one sample (relative frequencies).

binomial

Binomial co-occurrence assessment.

Value

A stats::dist object.

Author(s)

N. Frerebeau

See Also

Other diversity measures: heterogeneity(), plot_diversity, plot_rarefaction, profiles(), rarefaction(), richness(), she(), similarity(), simulate(), turnover()

Examples

## Data from Conkey 1980, Kintigh 1989
data("cantabria")

## Plot spot diagram of a co-occurrence matrix
occ_abs <- occurrence(cantabria, method = "absolute") # Absolute frequencies
plot_spot(occ_abs)

occ_rel <- occurrence(cantabria, method = "relative") # Relative frequencies
plot_spot(occ_rel)

## Binomial co-occurrence (similarity between types)
occ_bin <- occurrence(cantabria, method = "binomial")
plot_spot(occ_bin)

tabula documentation built on April 4, 2025, 5:09 a.m.