View source: R/occ_threshold.r
occ_threshold | R Documentation |
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.
occ_threshold(m, threshold, max_absent = 0)
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). |
matrix with low-occupancy species removed.
John L. Darcy
# library(specificity)
# attach(endophyte)
# dim(otutable)
# otutable_over25 <- occ_threshold(otutable, 25)
# dim(otutable_over25)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.