Learn R Programming

labdsv (version 1.8-0)

dropplt: Dropping Plots with Missing Values From Taxon and Site Data Frames

Description

Looks for plots which have missing values in site or environment data, and deletes those plots from both the taxon and site data frames.

Usage

dropplt(taxa,site,which=NULL)

Arguments

taxa

a taxon data frame with samples as rows and species as columns

site

a site or environment data frame with samples as rows and variables as columns

which

a switch to dpecify specific plots to drop from both data.frames

Value

produces a list with two components:

taxa

the new taxon data frame

site

the new site data frame

Details

First looks to see that the row names of the taxon data frame and the site or environment data frame are identical. If not, it prints an error message and exits. if which is NULL, It then looks at the site or environment data frame for plots or samples that have missing values, and deletes those plots from both the taxon and site data frames. Alternatively, if which is a numeric scalar or vector it deletes the specified plots from both the taxon and site data.frames.

Examples

Run this code
# NOT RUN {
    data(bryceveg)  # returns a data frame called bryceveg
    data(brycesite) # returns a data frame called brycesite
    demo <- dropplt(bryceveg,brycesite)
    newveg <- demo$taxa
    newsite <- demo$site
# }

Run the code above in your browser using DataLab