dropspc {labdsv}R Documentation

Dropping Species with Few Occurrences

Description

Eliminates species from the taxon data frame that occur fewer than or equal to a threshold number of occurrences.

Usage

dropspc(taxa,min=0)

Arguments

taxa

a taxon data frame

min

the threshold number of occurrences

Details

The function is useful for eliminating species (columns) from taxon data frames which never occur, which often happens if you eliminate plots, and those plots are the only ones that contain that species. In addition, many species are rare in data frames, and some algorithms (especially dissimilarity functions and table sorting routines) benefit from smaller simpler data frames.

Value

produces a new taxon data frame

Note

This is a heavy-handed approach to managing rare species in data frames. It is often possible to write a mask (logical vector) that suppresses the influence of rare species and keep the original data frame intact, but this function simplifies data management for some purposes.

Author(s)

David W. Roberts droberts@montana.edu

Examples

    data(bryceveg) # returns a data frame called bryceveg
    newveg <- dropspc(bryceveg,5) # deletes species which occur 5 or fewer times

[Package labdsv version 1.4-1 Index]