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: Compare Taxa Names in Tolerance Value and Assessment Data

# Compare taxa names in tolerance value and assessment data. <- toupper(names(site.species)[-1])
names.assess <- toupper(names(site.species.or)[-1])

names.all <- c(, names.assess)
names.match <- names.all[duplicated(names.all)] <- character(0)
names.miss.assess <- character(0)

for (i in 1:length( {
     if ([i], names.match))) {
 <- c(,[i])

for (i in 1:length(names.assess)) {
     if ([i], names.match))) {
          names.miss.assess <- c(names.miss.assess, names.assess[i])

print("Taxa in both databases")

print("Taxa in tolerance value db but not observed in assessment db")

print("Taxa in assessment db but not observed in tolerance value db")