dropplt {labdsv}R Documentation

Dropping Plots with Missing Values Form 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)

Arguments

taxa

a taxon data frame

site

a site or environment 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. 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.

Value

produces a list with two components:

taxa

the new taxon data frame

site

the new site data frame

Note

This is a VERY heavy-handed approach to managing missing values. Most R routines (including most of the package functions) have ways of handling missing values that are fairly graceful. This function simply maintains the correspondence between the taxon and site data frames while eliminating ALL missing values, and all plots that have missing values.

Author(s)

David W. Roberts droberts@montana.edu

Examples

    data(bryceveg) # returns a data frame called bryceveg
    data(brycesite) # returns a data frame called brycesite
    demo <- dropplt(bryceveg,brycesite)
    newveg <- demo$taxon
    newsite <- demo$site

[Package labdsv version 1.4-1 Index]