An official website of the United States government.

This is not the current EPA website. To navigate to the current EPA website, please go to This website is historical material reflecting the EPA website as it existed on January 19, 2021. This website is no longer updated and links to external websites and some internal pages may not work. More information »

CADDIS Volume 4

R Script: Set Up Variables

# Set up R files for running scripts
# Assumes that tab-delimited data files have been stored in
# working directory.

# Load data into R
site.species <- read.delim("site.species.txt")
site.species.or <- read.delim("site.species.or.txt") <- read.delim("") <- read.delim("")
refids <- read.delim("refids.or.txt")

# Merge biological and environmental data
dfmerge <- merge(site.species,, by = "SITE.ID")
dfmerge.or <- merge(site.species.or,, by = "SITE.ID")

# Set taxa.names
taxa.names <- c("ACENTRELLA", "DIPHETOR", "AMELETUS")