Learn R Programming

labdsv (version 1.2-2)

rndtaxa: Randomize a Taxa Data Frame

Description

Permutes a vegetation (or other) data frame to establish a basis for null model tests in vegetation ecology.

Usage

rndtaxa(taxa,replace=FALSE,species=FALSE,plots=FALSE)

Arguments

taxa
the vegetation (or other taxon) data.frame, samples as rows, species as columns
replace
a switch for permuting (if FALSE) or boostrapping (if TRUE)
species
a switch to control randomizing by species (if TRUE), maintaining species occurrence distributions
plots
a switch to control randomizing by samples (if TRUE), maintaining plot-level species richness

Value

  • a data.frame with samples as rows and species as columns of the same dimensions as entered.

Details

Permutes or bootstraps a vegetation data frame for input to dist, vegdist, dsvdis, or other routines. Can randomize by columns (species=TRUE), samples (plots=TRUE), or fully (neither species nor plots = TRUE).

References

http://ecology.msu.montana.edu/labdsv/R

Examples

Run this code
data(bryceveg) # returns a vegetation data.frame called bryceveg
    test <- rndtaxa(bryceveg,species=TRUE) # preserves species abundance 
            # distribution
    test2 <- rndtaxa(bryceveg,plots=TRUE) # preserves plot-level species richness}

Run the code above in your browser using DataLab