occ_threshold: occ_threshold

View source: R/occ_threshold.r

occ_thresholdR Documentation

occ_threshold

Description

removes species (columns) from a matrix that don't meet a minimum occupancy, defined as the number of samples in which that species was observed.

Usage

occ_threshold(m, threshold, max_absent = 0)

Arguments

m

matrix or data frame of numeric values. Columns represent species, rows are samples.

threshold

integer. Minimum number of samples a species can occupy without being removed.

max_absent

float. Maximum abundance value at which a species will be considered absent (default: 0).

Value

matrix with low-occupancy species removed.

Author(s)

John L. Darcy

Examples

# library(specificity)
# attach(endophyte)
# dim(otutable)
# otutable_over25 <- occ_threshold(otutable, 25)
# dim(otutable_over25)


darcyj/specificity documentation built on Aug. 1, 2023, 8 a.m.