diff --git a/apple-touch-icon-120x120.png b/apple-touch-icon-120x120.png index 7d86caf..606ff25 100644 Binary files a/apple-touch-icon-120x120.png and b/apple-touch-icon-120x120.png differ diff --git a/apple-touch-icon-152x152.png b/apple-touch-icon-152x152.png index e22b005..dcd6ad0 100644 Binary files a/apple-touch-icon-152x152.png and b/apple-touch-icon-152x152.png differ diff --git a/apple-touch-icon-180x180.png b/apple-touch-icon-180x180.png index 1b93611..fc71918 100644 Binary files a/apple-touch-icon-180x180.png and b/apple-touch-icon-180x180.png differ diff --git a/apple-touch-icon-60x60.png b/apple-touch-icon-60x60.png index 0ee7860..c0b7796 100644 Binary files a/apple-touch-icon-60x60.png and b/apple-touch-icon-60x60.png differ diff --git a/apple-touch-icon-76x76.png b/apple-touch-icon-76x76.png index c33e30a..3ca7ca2 100644 Binary files a/apple-touch-icon-76x76.png and b/apple-touch-icon-76x76.png differ diff --git a/apple-touch-icon.png b/apple-touch-icon.png index a9da92e..d00a5b7 100644 Binary files a/apple-touch-icon.png and b/apple-touch-icon.png differ diff --git a/articles/vignette_BioMonTools.html b/articles/vignette_BioMonTools.html index f9d8ca0..4c86351 100644 --- a/articles/vignette_BioMonTools.html +++ b/articles/vignette_BioMonTools.html @@ -94,7 +94,7 @@
vignettes/vignette_BioMonTools.Rmd
vignette_BioMonTools.Rmd
# view results
diff --git a/articles/vignette_MapTaxaObs.html b/articles/vignette_MapTaxaObs.html
index e019c78..094315e 100644
--- a/articles/vignette_MapTaxaObs.html
+++ b/articles/vignette_MapTaxaObs.html
@@ -94,7 +94,7 @@
Taxa Maps
Erik.Leppo@tetratech.com
- 2024-05-28
+ 2024-06-03
Source: vignettes/vignette_MapTaxaObs.Rmd
vignette_MapTaxaObs.Rmd
diff --git a/articles/vignette_NewIndex.html b/articles/vignette_NewIndex.html
index ed10a3d..b3f12df 100644
--- a/articles/vignette_NewIndex.html
+++ b/articles/vignette_NewIndex.html
@@ -94,7 +94,7 @@
Vignette, Adding a New Index
Erik.Leppo@tetratech.com
- 2024-05-28
+ 2024-06-03
Source: vignettes/vignette_NewIndex.Rmd
vignette_NewIndex.Rmd
diff --git a/favicon-16x16.png b/favicon-16x16.png
index 46a184d..07036fd 100644
Binary files a/favicon-16x16.png and b/favicon-16x16.png differ
diff --git a/favicon-32x32.png b/favicon-32x32.png
index 84b9797..77aa8e0 100644
Binary files a/favicon-32x32.png and b/favicon-32x32.png differ
diff --git a/pkgdown.yml b/pkgdown.yml
index 92135f2..d04f418 100644
--- a/pkgdown.yml
+++ b/pkgdown.yml
@@ -5,5 +5,5 @@ articles:
vignette_BioMonTools: vignette_BioMonTools.html
vignette_MapTaxaObs: vignette_MapTaxaObs.html
vignette_NewIndex: vignette_NewIndex.html
-last_built: 2024-05-28T21:17Z
+last_built: 2024-06-03T00:11Z
diff --git a/reference/metric.values.html b/reference/metric.values.html
index e6ec045..408d857 100644
--- a/reference/metric.values.html
+++ b/reference/metric.values.html
@@ -337,7 +337,7 @@ Examples
#> This is common with fish samples.
#> Valid values are TRUE or FALSE.
#> Other values are not recognized
-#> Error in dplyr::summarise(dplyr::group_by(myDF, SAMPLEID, INDEX_NAME, INDEX_CLASS, SAMP_WIDTH_M, SAMP_LENGTH_M), .groups = "drop_last", ni_total = sum(N_TAXA, na.rm = TRUE), ni_total_notoler = sum(N_TAXA[TOLER != "TOLERANT" | is.na(TOLER)], na.rm = TRUE), ni_natnonhybridnonmf = sum(N_TAXA[NATIVE == "NATIVE" & (HYBRID != TRUE | is.na(HYBRID)) & (TYPE != "MOSQUITOFISH" | is.na(TYPE))], na.rm = TRUE), ni_natnonhybridnonmfnonLepomis = sum(N_TAXA[NATIVE == "NATIVE" & (HYBRID != TRUE | is.na(HYBRID)) & (TYPE != "MOSQUITOFISH" | is.na(TYPE)) & (GENUS != "LEPOMIS" | is.na(GENUS))], na.rm = TRUE), pi_AmmEthPerc = 100 * sum(N_TAXA[GENUS == "AMMOCRYPTA" | GENUS == "ETHEOSTOMA" | GENUS == "PERCINA"], na.rm = TRUE)/ni_total, pi_AmmEthPerc_Cott_Notur = 100 * sum(N_TAXA[(GENUS == "AMMOCRYPTA" | GENUS == "ETHEOSTOMA" | GENUS == "PERCINA" | GENUS == "NOTURUS") | FAMILY == "COTTIDAE"], na.rm = TRUE)/ni_total, pi_rbs = 100 * sum(N_TAXA[TYPE == "RBS"], na.rm = TRUE)/ni_total, pi_brooktrout = 100 * sum(N_TAXA[TYPE == "BROOK TROUT"], na.rm = TRUE)/ni_total, pi_brooktrout_wild = 100 * sum(N_TAXA[TAXAID == "BROOK TROUT, WILD"], na.rm = TRUE)/ni_total, pi_Cato = 100 * sum(N_TAXA[FAMILY == "CATOSTOMIDAE"], na.rm = TRUE)/ni_total, pi_Cent = 100 * sum(N_TAXA[FAMILY == "CENTRARCHIDAE"], na.rm = TRUE)/ni_total, pi_natCent = 100 * sum(N_TAXA[NATIVE == "NATIVE" & FAMILY == "CENTRARCHIDAE"], na.rm = TRUE)/ni_total, pi_Cott = 100 * sum(N_TAXA[FAMILY == "COTTIDAE"], na.rm = TRUE)/ni_total, pi_Cyprin = 100 * sum(N_TAXA[FAMILY == "CYPRINIDAE"], na.rm = TRUE)/ni_total, pi_Ictal = 100 * sum(N_TAXA[FAMILY == "ICTALURIDAE"], na.rm = TRUE)/ni_total, pi_native = 100 * sum(N_TAXA[NATIVE == "NATIVE"], na.rm = TRUE)/ni_total, pi_nonnative = 100 * sum(N_TAXA[is.na(NATIVE) | NATIVE != "NATIVE"], na.rm = TRUE)/ni_total, pi_Notur = 100 * sum(N_TAXA[GENUS == "NOTURUS"], na.rm = TRUE)/ni_total, pi_sculpin = 100 * sum(N_TAXA[TYPE == "SCULPIN"], na.rm = TRUE)/ni_total, pi_Lepomis = 100 * sum(N_TAXA[GENUS == "LEPOMIS"], na.rm = TRUE)/ni_total, pi_Salm = 100 * sum(N_TAXA[FAMILY == "SALMONIDAE"], na.rm = TRUE)/ni_total, pi_trout = 100 * sum(N_TAXA["TROUT" %in% TYPE], na.rm = TRUE)/ni_total, pi_brooktrout_BCG_att6 = 100 * (sum(N_TAXA[TYPE == "BROOK TROUT"], na.rm = TRUE) + sum(N_TAXA[BCG_ATTR == "6"], na.rm = TRUE))/ni_total, pi_connect = 100 * sum(N_TAXA[CONNECTIVITY == TRUE], na.rm = TRUE)/ni_total, pi_scc = 100 * sum(N_TAXA[SCC == TRUE], na.rm = TRUE)/ni_total, pi_brooktrout2brooktrout_BCG_att6 = 100 * sum(N_TAXA[TYPE == "BROOK TROUT"], na.rm = TRUE)/(sum(N_TAXA[TYPE == "BROOK TROUT"], na.rm = TRUE) + sum(N_TAXA[BCG_ATTR == "6"], na.rm = TRUE)), pi_bfs = 100 * sum(N_TAXA[(TYPE == "BENTHIC" & TROPHIC_IV == TRUE) | TYPE == "RBS" | TYPE == "SMM"], na.rm = TRUE)/ni_total, nt_total = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & N_TAXA > 0], na.rm = TRUE), nt_benthic = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TYPE == "BENTHIC"], na.rm = TRUE), nt_AmmEthPerc = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (GENUS == "AMMOCRYPTA" | GENUS == "ETHEOSTOMA" | GENUS == "PERCINA")], na.rm = TRUE), nt_AmmEthPerc_Cott_Notur = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (GENUS == "AMMOCRYPTA" | GENUS == "ETHEOSTOMA" | GENUS == "PERCINA" | GENUS == "NOTURUS") | FAMILY == "COTTIDAE"], na.rm = TRUE), nt_Cato = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & FAMILY == "CATOSTOMIDAE"], na.rm = TRUE), nt_Cent = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & FAMILY == "CENTRARCHIDAE"], na.rm = TRUE), nt_natCent = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & NATIVE == "NATIVE" & FAMILY == "CENTRARCHIDAE"], na.rm = TRUE), nt_Cott = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & FAMILY == "COTTIDAE"], na.rm = TRUE), nt_Cyprin = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & FAMILY == "CYPRINIDAE"], na.rm = TRUE), nt_natCyprin = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & NATIVE == "NATIVE" & FAMILY == "CYPRINIDAE"], na.rm = TRUE), nt_Lepomis = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & GENUS == "LEPOMIS"], na.rm = TRUE), nt_native = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & NATIVE == "NATIVE" & N_TAXA > 0], na.rm = TRUE), nt_nonnative = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (is.na(NATIVE) | NATIVE != "NATIVE") & N_TAXA > 0], na.rm = TRUE), nt_nativenonhybrid = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & NATIVE == "NATIVE" & (HYBRID != TRUE | is.na(HYBRID))], na.rm = TRUE), nt_Notur = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & GENUS == "NOTURUS"], na.rm = TRUE), nt_Ictal = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & FAMILY == "ICTALURIDAE"], na.rm = TRUE), nt_natsunfish = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & NATIVE == "NATIVE" & TYPE == "SUNFISH"], na.rm = TRUE), nt_natCent_sunfish = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & NATIVE == "NATIVE" & (TYPE == "SUNFISH" | TYPE == "CENTRARCHIDAE")], na.rm = TRUE), nt_natCent = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & NATIVE == "NATIVE" & FAMILY == "CENTRARCHIDAE"], na.rm = TRUE), nt_natinsctCypr = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & NATIVE == "NATIVE" & TROPHIC_IS == TRUE & FAMILY == "CYPRINIDAE"], na.rm = TRUE), nt_natrbs = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & NATIVE == "NATIVE" & TYPE == "RBS"], na.rm = TRUE), nt_Petro = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & FAMILY == "PETROMYZONTIDAE"], na.rm = TRUE), nt_Salm = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & FAMILY == "SALMONIDAE"], na.rm = TRUE), nt_connect = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & CONNECTIVITY == TRUE], na.rm = TRUE), nt_scc = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & SCC == TRUE], na.rm = TRUE), nt_beninsct_nows_nobg = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TROPHIC_IS == TRUE & (TAXAID != "CATOSTOMUS COMMERSONII" | TAXAID != "LEPOMIS MACROCHIRUS" | is.na(TAXAID))], na.rm = TRUE), nt_trout_sunfish_notoler = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & ("TROUT" %in% TYPE | TYPE == "SUNFISH") & (TOLER != "TOLERANT" | is.na(TOLER))], na.rm = TRUE), pt_AmmEthPerc = 100 * nt_AmmEthPerc/nt_total, pt_AmmEthPerc_Cott_Notur = 100 * nt_AmmEthPerc_Cott_Notur/nt_total, pt_Cato = 100 * nt_Cato/nt_total, pt_Cent = 100 * nt_Cent/nt_total, pt_natCent = 100 * nt_natCent/nt_total, pt_Cott = 100 * nt_Cott/nt_total, pt_Cyprin = 100 * nt_Cyprin/nt_total, pt_Ictal = 100 * nt_Ictal/nt_total, pt_Lepomis = 100 * nt_Lepomis/nt_total, pt_native = 100 * nt_native/nt_total, pt_nonnative = 100 * nt_nonnative/nt_total, pt_Notur = 100 * nt_Notur/nt_total, pt_Salm = 100 * nt_Salm/nt_total, pt_connect = 100 * nt_connect/nt_total, pt_scc = 100 * nt_scc/nt_total, nt_beninvert = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TYPE == "BENTHIC" & TROPHIC_IV == TRUE], na.rm = TRUE), nt_habitat_beninvert = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TROPHIC_IV == TRUE & HABITAT_B == TRUE], na.rm = TRUE), nt_detritivore = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TROPHIC_DE == TRUE], na.rm = TRUE), nt_herbivore = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TROPHIC_HB == TRUE], na.rm = TRUE), nt_omnivore = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TROPHIC_OM == TRUE], na.rm = TRUE), nt_planktivore = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TROPHIC_PL == TRUE], na.rm = TRUE), nt_topcarn = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TROPHIC_TC == TRUE], na.rm = TRUE), nt_piscivore = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TROPHIC_PI == TRUE], na.rm = TRUE), pi_lithophil = 100 * sum(N_TAXA[SILT == TRUE], na.rm = TRUE)/ni_total, pi_habitat_beninvert = 100 * sum(N_TAXA[TROPHIC_IV == TRUE & HABITAT_B == TRUE], na.rm = TRUE)/ni_total, pi_detritivore = 100 * sum(N_TAXA[TROPHIC_DE == TRUE], na.rm = TRUE)/ni_total, pi_genomninvrt = 100 * sum(N_TAXA[TROPHIC_GE == TRUE | TROPHIC_OM == TRUE | TROPHIC_IV == TRUE], na.rm = TRUE)/ni_total, pi_herbivore = 100 * sum(N_TAXA[TROPHIC_HB == TRUE], na.rm = TRUE)/ni_total, pi_insectivore = 100 * sum(N_TAXA[TROPHIC_IS == TRUE], na.rm = TRUE)/ni_total, pi_insctCypr = 100 * sum(N_TAXA[TROPHIC_IS == TRUE & FAMILY == "CYPRINIDAE"], na.rm = TRUE)/ni_total, pi_gen = 100 * sum(N_TAXA[TROPHIC_GE == TRUE], na.rm = TRUE)/ni_total, pi_genherb = 100 * sum(N_TAXA[TROPHIC_GE == TRUE | TROPHIC_HB == TRUE], na.rm = TRUE)/ni_total, pi_omnivore = 100 * sum(N_TAXA[TROPHIC_OM == TRUE], na.rm = TRUE)/ni_total, pi_planktivore = 100 * sum(N_TAXA[TROPHIC_PL == TRUE], na.rm = TRUE)/ni_total, pi_topcarn = 100 * sum(N_TAXA[TROPHIC_TC == TRUE], na.rm = TRUE)/ni_total, pi_trout = 100 * sum(N_TAXA["TROUT" %in% TYPE], na.rm = TRUE)/ni_total, pi_pisc_noae = 100 * sum(N_TAXA[TYPE == "PISCIVORE" & (TAXAID != "ANGUILLA ROSTRATA" | is.na(TAXAID))], na.rm = TRUE)/ni_total, pt_habitat_beninvert = 100 * nt_habitat_beninvert/nt_total, pt_detritivore = 100 * nt_detritivore/nt_total, pt_herbivore = 100 * nt_herbivore/nt_total, pt_omnivore = 100 * nt_omnivore/nt_total, pt_planktivore = 100 * nt_planktivore/nt_total, pt_topcarn = 100 * nt_topcarn/nt_total, nt_tv_intol = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TOLER == "INTOLERANT"], na.rm = TRUE), nt_tv_intolhwi = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (TOLER == "INTOLERANT" | TOLER == "HWI")], na.rm = TRUE), pi_tv_toler = 100 * sum(N_TAXA[TOLER == "TOLERANT"], na.rm = TRUE)/ni_total, x_Shan_e = -sum((N_TAXA/ni_total) * log((N_TAXA/ni_total)), na.rm = TRUE), x_Shan_2 = x_Shan_e/log(2), x_Shan_10 = x_Shan_e/log(10), x_Evenness = x_Shan_e/log(nt_total), x_Evenness100_ni99gt = ifelse(ni_total < 100, 1, x_Evenness * 100), length_m = max(SAMP_LENGTH_M, na.rm = TRUE), area_m2 = max(SAMP_WIDTH_M, na.rm = TRUE) * length_m, ni_m2 = ni_total/area_m2, ni_200m = 200 * ni_total/length_m, ni_natnonhybridnonmf_200m = 200 * ni_natnonhybridnonmf/length_m, ni_natnonhybridnonmfnonLepomis_200m = 200 * ni_natnonhybridnonmfnonLepomis/length_m, biomass_m2 = max(SAMP_BIOMASS, na.rm = TRUE)/area_m2, pi_anomalies = 100 * sum(N_ANOMALIES, na.rm = TRUE)/ni_total, pi_delt = 100 * sum(N_ANOMALIES, na.rm = TRUE)/ni_total, pi_dom01 = 100 * max(N_TAXA, na.rm = TRUE)/ni_total, pi_dom02 = 100 * max(ni_dom02, na.rm = TRUE)/ni_total, pi_dom03 = 100 * max(ni_dom03, na.rm = TRUE)/ni_total, pi_dom04 = 100 * max(ni_dom04, na.rm = TRUE)/ni_total, pi_dom05 = 100 * max(ni_dom05, na.rm = TRUE)/ni_total, pi_dom06 = 100 * max(ni_dom06, na.rm = TRUE)/ni_total, pi_dom07 = 100 * max(ni_dom07, na.rm = TRUE)/ni_total, pi_dom08 = 100 * max(ni_dom08, na.rm = TRUE)/ni_total, pi_dom09 = 100 * max(ni_dom09, na.rm = TRUE)/ni_total, pi_dom10 = 100 * max(ni_dom10, na.rm = TRUE)/ni_total, nt_BCG_att1 = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & BCG_ATTR == "1"], na.rm = TRUE), nt_BCG_att12 = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "1" | BCG_ATTR == "2")], na.rm = TRUE), nt_BCG_att123 = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3")], na.rm = TRUE), nt_BCG2_att123b = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR2 == "3_BETTER")], na.rm = TRUE), nt_BCG_att1234 = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "4")], na.rm = TRUE), nt_BCG2_att1234b = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR2 == "4_BETTER")], na.rm = TRUE), nt_BCG_att1236 = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "6")], na.rm = TRUE), nt_BCG_att1236b = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "6B")], na.rm = TRUE), nt_BCG_att12346 = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "4" | BCG_ATTR == "6")], na.rm = TRUE), nt_BCG_att12346b = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "4" | BCG_ATTR == "6B")], na.rm = TRUE), nt_BCG_att1i236i = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "1I" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "6I")], na.rm = TRUE), nt_BCG_att2 = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & BCG_ATTR == "2"], na.rm = TRUE), nt_BCG_att2native = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & BCG_ATTR == "2" & NATIVE == "NATIVE"], na.rm = TRUE), nt_BCG_att23_scc = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "2" | BCG_ATTR == "3") & SCC == TRUE], na.rm = TRUE), nt_BCG_att3 = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & BCG_ATTR == "3"], na.rm = TRUE), nt_BCG_att3native = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & BCG_ATTR == "3" & NATIVE == "NATIVE"], na.rm = TRUE), nt_BCG_att4 = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & BCG_ATTR == "4"], na.rm = TRUE), nt_BCG_att4native = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & BCG_ATTR == "4" & NATIVE == "NATIVE"], na.rm = TRUE), nt_BCG_att5 = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & BCG_ATTR == "5"], na.rm = TRUE), nt_BCG_att5native = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & BCG_ATTR == "5" & NATIVE == "NATIVE"], na.rm = TRUE), nt_BCG_att55a6 = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "5" | BCG_ATTR == "5A" | BCG_ATTR == "6")], na.rm = TRUE), nt_BCG_att55a6a = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "5" | BCG_ATTR == "5A" | BCG_ATTR == "6A")], na.rm = TRUE), nt_BCG_att56t = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "5" | BCG_ATTR == "6T")], na.rm = TRUE), nt_BCG_att6i = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & BCG_ATTR == "6I"], na.rm = TRUE), nt_BCG_att6m = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & BCG_ATTR == "6M"], na.rm = TRUE), nt_BCG_att6t = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & BCG_ATTR == "6T"], na.rm = TRUE), nt_BCG_attNA = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & is.na(BCG_ATTR)], na.rm = TRUE), pi_BCG_att12 = 100 * sum(N_TAXA[(BCG_ATTR == "1" | BCG_ATTR == "2")], na.rm = TRUE)/ni_total, pi_BCG_att123 = 100 * sum(N_TAXA[(BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3")], na.rm = TRUE)/ni_total, pi_BCG_att1234 = 100 * sum(N_TAXA[(BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "4")], na.rm = TRUE)/ni_total, pi_BCG_att1236 = 100 * sum(N_TAXA[(BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "6")], na.rm = TRUE)/ni_total, pi_BCG_att1236sp = 100 * sum(N_TAXA[(BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "6")], na.rm = TRUE)/sum(N_TAXA[(BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "6" | BCG_ATTR == "5" | BCG_ATTR == "5A" | BCG_ATTR == "6A")], na.rm = TRUE), pi_BCG_att1236b = 100 * sum(N_TAXA[(BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "6B")], na.rm = TRUE)/ni_total, pi_BCG_att12346b = 100 * sum(N_TAXA[(BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "4" | BCG_ATTR == "6B")], na.rm = TRUE)/ni_total, pi_BCG_att1i236i = 100 * sum(N_TAXA[(BCG_ATTR == "1I" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "6I")], na.rm = TRUE)/ni_total, pi_BCG_att2 = 100 * sum(N_TAXA[BCG_ATTR == "2"], na.rm = TRUE)/ni_total, pi_BCG_att2native = 100 * sum(N_TAXA[BCG_ATTR == "2" & NATIVE == "NATIVE"], na.rm = TRUE)/ni_total, pi_BCG_att23_scc = 100 * sum(N_TAXA[(BCG_ATTR == "2" | BCG_ATTR == "3") & SCC == TRUE], na.rm = TRUE)/ni_total, pi_BCG_att3 = 100 * sum(N_TAXA[BCG_ATTR == "3"], na.rm = TRUE)/ni_total, pi_BCG_att3native = 100 * sum(N_TAXA[BCG_ATTR == "3" & NATIVE == "NATIVE"], na.rm = TRUE)/ni_total, pi_BCG_att4 = 100 * sum(N_TAXA[BCG_ATTR == "4"], na.rm = TRUE)/ni_total, pi_BCG_att4native = 100 * sum(N_TAXA[BCG_ATTR == "4" & NATIVE == "NATIVE"], na.rm = TRUE)/ni_total, pi_BCG_att5 = 100 * sum(N_TAXA[BCG_ATTR == "5"], na.rm = TRUE)/ni_total, pi_BCG_att5native = 100 * sum(N_TAXA[BCG_ATTR == "5" & NATIVE == "NATIVE"], na.rm = TRUE)/ni_total, pi_BCG_att55a6a = 100 * sum(N_TAXA[(BCG_ATTR == "5" | BCG_ATTR == "5A" | BCG_ATTR == "6A")], na.rm = TRUE)/ni_total, pi_BCG_att56a = 100 * sum(N_TAXA[(BCG_ATTR == "5" | BCG_ATTR == "6A")], na.rm = TRUE)/ni_total, pi_BCG_att5a6a = 100 * sum(N_TAXA[(BCG_ATTR == "5A" | BCG_ATTR == "6A")], na.rm = TRUE)/ni_total, pi_BCG_att56t = 100 * sum(N_TAXA[(BCG_ATTR == "5" | BCG_ATTR == "6T")], na.rm = TRUE)/ni_total, pi_BCG_att6 = 100 * sum(N_TAXA[BCG_ATTR == "6"], na.rm = TRUE)/ni_total, pi_BCG_att6i = 100 * sum(N_TAXA[BCG_ATTR == "6I"], na.rm = TRUE)/ni_total, pi_BCG_att6m = 100 * sum(N_TAXA[BCG_ATTR == "6M"], na.rm = TRUE)/ni_total, pi_BCG_att6t = 100 * sum(N_TAXA[BCG_ATTR == "6T"], na.rm = TRUE)/ni_total, pi_BCG_att66a = 100 * sum(N_TAXA[(BCG_ATTR == "6" | BCG_ATTR == "6A")], na.rm = TRUE)/ni_total, pi_BCG_att66a6b = 100 * sum(N_TAXA[(BCG_ATTR == "6" | BCG_ATTR == "6A" | BCG_ATTR == "6B")], na.rm = TRUE)/ni_total, pi_BCG_att66s6t = 100 * sum(N_TAXA[BCG_ATTR == "6" | BCG_ATTR == "6S" | BCG_ATTR == "6T"], na.rm = TRUE)/ni_total, pi_BCG_attNA = 100 * sum(N_TAXA[is.na(BCG_ATTR)], na.rm = TRUE)/ni_total, pt_BCG_att12 = 100 * nt_BCG_att12/nt_total, pt_BCG_att123 = 100 * nt_BCG_att123/nt_total, pt_BCG2_att123b = 100 * nt_BCG2_att123b/nt_total, pt_BCG_att1234 = 100 * nt_BCG_att1234/nt_total, pt_BCG2_att1234b = 100 * nt_BCG2_att1234b/nt_total, pt_BCG_att1236 = 100 * nt_BCG_att1236/nt_total, pt_BCG_att1236b = 100 * nt_BCG_att1236b/nt_total, pt_BCG_att1236sp = 100 * nt_BCG_att1236/(nt_BCG_att1236 + nt_BCG_att55a6a), pt_BCG_att12346b = 100 * nt_BCG_att12346b/nt_total, pt_BCG_att1i236i = 100 * nt_BCG_att1i236i/nt_total, pt_BCG_att2 = 100 * nt_BCG_att2/nt_total, pt_BCG_att2native = 100 * nt_BCG_att2native/nt_total, pt_BCG_att23_scc = 100 * nt_BCG_att23_scc/nt_total, pt_BCG_att3 = 100 * nt_BCG_att3/nt_total, pt_BCG_att3native = 100 * nt_BCG_att3native/nt_total, pt_BCG_att4 = 100 * nt_BCG_att4/nt_total, pt_BCG_att4native = 100 * nt_BCG_att4native/nt_total, pt_BCG_att5 = 100 * nt_BCG_att5/nt_total, pt_BCG_att5native = 100 * nt_BCG_att5native/nt_total, pt_BCG_att55a6a = 100 * nt_BCG_att55a6/nt_total, pt_BCG_att56t = 100 * nt_BCG_att56t/nt_total, pt_BCG_att6i = 100 * nt_BCG_att6i/nt_total, pt_BCG_att6m = 100 * nt_BCG_att6m/nt_total, pt_BCG_att6t = 100 * nt_BCG_att6t/nt_total, pt_BCG_attNA = 100 * nt_BCG_attNA/nt_total, pi_dom01_BCG_att4 = 100 * max(0, N_TAXA[(BCG_ATTR == "4")], na.rm = TRUE)/ni_total, pi_dom01_BCG_att45 = 100 * max(0, N_TAXA[(BCG_ATTR == "4" | BCG_ATTR == "5")], na.rm = TRUE)/ni_total, pi_dom01_BCG_att5 = 100 * max(0, N_TAXA[(BCG_ATTR == "5")], na.rm = TRUE)/ni_total, pi_dom01_BCG_att5a = 100 * max(0, N_TAXA[(BCG_ATTR == "5A")], na.rm = TRUE)/ni_total, pi_dom01_BCG_att5a6a = 100 * max(0, N_TAXA[(BCG_ATTR == "5A" | BCG_ATTR == "6A")], na.rm = TRUE)/ni_total, pi_dom01_BCG_att566a = 100 * max(0, N_TAXA[(BCG_ATTR == "5" | BCG_ATTR == "6" | BCG_ATTR == "6A")], na.rm = TRUE)/ni_total, nt_ti_corecold = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TI_CORECOLD == TRUE], na.rm = TRUE), nt_ti_cold = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TI_COLD == TRUE], na.rm = TRUE), nt_ti_cool = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TI_COOL == TRUE], na.rm = TRUE), nt_ti_warm = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TI_WARM == TRUE], na.rm = TRUE), nt_ti_eury = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TI_EURY == TRUE], na.rm = TRUE), nt_ti_na = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TI_NA == TRUE], na.rm = TRUE), nt_ti_corecold_cold = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (TI_CORECOLD == TRUE | TI_COLD == TRUE)], na.rm = TRUE), nt_ti_cool_warm = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (TI_COOL == TRUE | TI_WARM == TRUE)], na.rm = TRUE), pi_ti_corecold = 100 * sum(N_TAXA[TI_CORECOLD == TRUE], na.rm = TRUE)/ni_total, pi_ti_cold = 100 * sum(N_TAXA[TI_COLD == TRUE], na.rm = TRUE)/ni_total, pi_ti_cool = 100 * sum(N_TAXA[TI_COOL == TRUE], na.rm = TRUE)/ni_total, pi_ti_warm = 100 * sum(N_TAXA[TI_WARM == TRUE], na.rm = TRUE)/ni_total, pi_ti_eury = 100 * sum(N_TAXA[TI_EURY == TRUE], na.rm = TRUE)/ni_total, pi_ti_na = 100 * sum(N_TAXA[TI_NA == TRUE], na.rm = TRUE)/ni_total, pi_ti_corecold_cold = 100 * sum(N_TAXA[TI_CORECOLD == TRUE | TI_COLD == TRUE], na.rm = TRUE)/ni_total, pi_ti_cool_warm = 100 * sum(N_TAXA[TI_COOL == TRUE | TI_WARM == TRUE], na.rm = TRUE)/ni_total, pt_ti_corecold = 100 * nt_ti_corecold/nt_total, pt_ti_cold = 100 * nt_ti_cold/nt_total, pt_ti_cool = 100 * nt_ti_cool/nt_total, pt_ti_warm = 100 * nt_ti_warm/nt_total, pt_ti_eury = 100 * nt_ti_eury/nt_total, pt_ti_na = 100 * nt_ti_na/nt_total, pt_ti_corecold_cold = 100 * nt_ti_corecold_cold/nt_total, pt_ti_cool_warm = 100 * nt_ti_cool_warm/nt_total, nt_elev_low = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & ELEVATION_LOW == TRUE], na.rm = TRUE), nt_elev_high = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & ELEVATION_HIGH == TRUE], na.rm = TRUE), nt_grad_low = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & GRADIENT_LOW == TRUE], na.rm = TRUE), nt_grad_mod = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & GRADIENT_MOD == TRUE], na.rm = TRUE), nt_grad_high = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & GRADIENT_HIGH == TRUE], na.rm = TRUE), nt_wsarea_small = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & WSAREA_S == TRUE], na.rm = TRUE), nt_wsarea_medium = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & WSAREA_M == TRUE], na.rm = TRUE), nt_wsarea_large = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & WSAREA_L == TRUE], na.rm = TRUE), nt_wsarea_xlarge = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & WSAREA_XL == TRUE], na.rm = TRUE), nt_repro_broadcaster = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & REPRO_BCAST == TRUE], na.rm = TRUE), nt_repro_nestsimp = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & REPRO_NS == TRUE], na.rm = TRUE), nt_repro_nestcomp = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & REPRO_NC == TRUE], na.rm = TRUE), nt_repro_bearer = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & REPRO_BEAR == TRUE], na.rm = TRUE), nt_repro_migratory = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & REPRO_MIG == TRUE], na.rm = TRUE), nt_repro_lithophil = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & REPRO_LITH == TRUE], na.rm = TRUE), pi_repro_lithophil = 100 * sum(N_TAXA[REPRO_LITH == TRUE], na.rm = TRUE)/ni_total, pt_repro_lithophil = 100 * nt_repro_lithophil/nt_total, nt_habitat_b = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & HABITAT_B == TRUE], na.rm = TRUE), nt_habitat_w = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & HABITAT_W == TRUE], na.rm = TRUE), nt_habitat_f = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & HABITAT_F == TRUE], na.rm = TRUE), pi_habitat_b = 100 * sum(N_TAXA[HABITAT_B == TRUE], na.rm = TRUE)/ni_total, pi_habitat_w = 100 * sum(N_TAXA[HABITAT_W == TRUE], na.rm = TRUE)/ni_total, pi_habitat_f = 100 * sum(N_TAXA[HABITAT_F == TRUE], na.rm = TRUE)/ni_total, pt_habitat_b = 100 * nt_habitat_b/nt_total, pt_habitat_w = 100 * nt_habitat_w/nt_total, pt_habitat_f = 100 * nt_habitat_f/nt_total, nt_piscivore_BCG_att66s6t = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TROPHIC_PI == TRUE & (BCG_ATTR == "6" | BCG_ATTR == "6S" | BCG_ATTR == "6T")], na.rm = TRUE), nt_LLNLB = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TYPE == "LLNLB"], na.rm = TRUE), nt_Cyprin_BCG_att1234 = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & FAMILY == "CYPRINIDAE" & (BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "4")], na.rm = TRUE), ni_Hybognathus_amarus = sum(N_TAXA[TAXAID == "HYBOGNATHUS AMARUS"], na.rm = TRUE), x_TrophicCats = dplyr::n_distinct(TROPHIC, na.rm = TRUE), x_BCG_Mean = mean(TOLVAL2, na.rm = TRUE), nt_PupKilli = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (TAXAID == "CYPRINODON RUBROFLUVIATILIS" | TAXAID == "FUNDULUS KANSAE" | TAXAID == "FUNDULUS ZEBRINUS")], na.rm = TRUE)): ℹ In argument: `x_BCG_Mean = mean(TOLVAL2, na.rm = TRUE)`.
+#> Error in dplyr::summarise(dplyr::group_by(myDF, SAMPLEID, INDEX_NAME, INDEX_CLASS, SAMP_WIDTH_M, SAMP_LENGTH_M), .groups = "drop_last", ni_total = sum(N_TAXA, na.rm = TRUE), ni_total_notoler = sum(N_TAXA[TOLER != "TOLERANT" | is.na(TOLER)], na.rm = TRUE), ni_natnonhybridnonmf = sum(N_TAXA[NATIVE == "NATIVE" & (HYBRID != TRUE | is.na(HYBRID)) & (TYPE != "MOSQUITOFISH" | is.na(TYPE))], na.rm = TRUE), ni_natnonhybridnonmfnonLepomis = sum(N_TAXA[NATIVE == "NATIVE" & (HYBRID != TRUE | is.na(HYBRID)) & (TYPE != "MOSQUITOFISH" | is.na(TYPE)) & (GENUS != "LEPOMIS" | is.na(GENUS))], na.rm = TRUE), pi_AmmEthPerc = 100 * sum(N_TAXA[GENUS == "AMMOCRYPTA" | GENUS == "ETHEOSTOMA" | GENUS == "PERCINA"], na.rm = TRUE)/ni_total, pi_AmmEthPerc_Cott_Notur = 100 * sum(N_TAXA[(GENUS == "AMMOCRYPTA" | GENUS == "ETHEOSTOMA" | GENUS == "PERCINA" | GENUS == "NOTURUS") | FAMILY == "COTTIDAE"], na.rm = TRUE)/ni_total, pi_rbs = 100 * sum(N_TAXA[TYPE == "RBS"], na.rm = TRUE)/ni_total, pi_brooktrout = 100 * sum(N_TAXA[TYPE == "BROOK TROUT"], na.rm = TRUE)/ni_total, pi_brooktrout_wild = 100 * sum(N_TAXA[TAXAID == "BROOK TROUT, WILD"], na.rm = TRUE)/ni_total, pi_Cato = 100 * sum(N_TAXA[FAMILY == "CATOSTOMIDAE"], na.rm = TRUE)/ni_total, pi_Cent = 100 * sum(N_TAXA[FAMILY == "CENTRARCHIDAE"], na.rm = TRUE)/ni_total, pi_natCent = 100 * sum(N_TAXA[NATIVE == "NATIVE" & FAMILY == "CENTRARCHIDAE"], na.rm = TRUE)/ni_total, pi_Cott = 100 * sum(N_TAXA[FAMILY == "COTTIDAE"], na.rm = TRUE)/ni_total, pi_Cyprin = 100 * sum(N_TAXA[FAMILY == "CYPRINIDAE"], na.rm = TRUE)/ni_total, pi_Ictal = 100 * sum(N_TAXA[FAMILY == "ICTALURIDAE"], na.rm = TRUE)/ni_total, pi_native = 100 * sum(N_TAXA[NATIVE == "NATIVE"], na.rm = TRUE)/ni_total, pi_nonnative = 100 * sum(N_TAXA[is.na(NATIVE) | NATIVE != "NATIVE"], na.rm = TRUE)/ni_total, pi_Notur = 100 * sum(N_TAXA[GENUS == "NOTURUS"], na.rm = TRUE)/ni_total, pi_sculpin = 100 * sum(N_TAXA[TYPE == "SCULPIN"], na.rm = TRUE)/ni_total, pi_Lepomis = 100 * sum(N_TAXA[GENUS == "LEPOMIS"], na.rm = TRUE)/ni_total, pi_Salm = 100 * sum(N_TAXA[FAMILY == "SALMONIDAE"], na.rm = TRUE)/ni_total, pi_trout = 100 * sum(N_TAXA["TROUT" %in% TYPE], na.rm = TRUE)/ni_total, pi_brooktrout_BCG_att6 = 100 * (sum(N_TAXA[TYPE == "BROOK TROUT"], na.rm = TRUE) + sum(N_TAXA[BCG_ATTR == "6"], na.rm = TRUE))/ni_total, pi_connect = 100 * sum(N_TAXA[CONNECTIVITY == TRUE], na.rm = TRUE)/ni_total, pi_scc = 100 * sum(N_TAXA[SCC == TRUE], na.rm = TRUE)/ni_total, pi_brooktrout2brooktrout_BCG_att6 = 100 * sum(N_TAXA[TYPE == "BROOK TROUT"], na.rm = TRUE)/(sum(N_TAXA[TYPE == "BROOK TROUT"], na.rm = TRUE) + sum(N_TAXA[BCG_ATTR == "6"], na.rm = TRUE)), pi_bfs = 100 * sum(N_TAXA[(TYPE == "BENTHIC" & TROPHIC_IV == TRUE) | TYPE == "RBS" | TYPE == "SMM"], na.rm = TRUE)/ni_total, nt_total = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & N_TAXA > 0], na.rm = TRUE), nt_benthic = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TYPE == "BENTHIC"], na.rm = TRUE), nt_AmmEthPerc = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (GENUS == "AMMOCRYPTA" | GENUS == "ETHEOSTOMA" | GENUS == "PERCINA")], na.rm = TRUE), nt_AmmEthPerc_Cott_Notur = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (GENUS == "AMMOCRYPTA" | GENUS == "ETHEOSTOMA" | GENUS == "PERCINA" | GENUS == "NOTURUS") | FAMILY == "COTTIDAE"], na.rm = TRUE), nt_Cato = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & FAMILY == "CATOSTOMIDAE"], na.rm = TRUE), nt_Cent = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & FAMILY == "CENTRARCHIDAE"], na.rm = TRUE), nt_natCent = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & NATIVE == "NATIVE" & FAMILY == "CENTRARCHIDAE"], na.rm = TRUE), nt_Cott = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & FAMILY == "COTTIDAE"], na.rm = TRUE), nt_Cyprin = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & FAMILY == "CYPRINIDAE"], na.rm = TRUE), nt_natCyprin = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & NATIVE == "NATIVE" & FAMILY == "CYPRINIDAE"], na.rm = TRUE), nt_Lepomis = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & GENUS == "LEPOMIS"], na.rm = TRUE), nt_native = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & NATIVE == "NATIVE" & N_TAXA > 0], na.rm = TRUE), nt_nonnative = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (is.na(NATIVE) | NATIVE != "NATIVE") & N_TAXA > 0], na.rm = TRUE), nt_nativenonhybrid = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & NATIVE == "NATIVE" & (HYBRID != TRUE | is.na(HYBRID))], na.rm = TRUE), nt_Notur = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & GENUS == "NOTURUS"], na.rm = TRUE), nt_Ictal = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & FAMILY == "ICTALURIDAE"], na.rm = TRUE), nt_natsunfish = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & NATIVE == "NATIVE" & TYPE == "SUNFISH"], na.rm = TRUE), nt_natCent_sunfish = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & NATIVE == "NATIVE" & (TYPE == "SUNFISH" | TYPE == "CENTRARCHIDAE")], na.rm = TRUE), nt_natCent = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & NATIVE == "NATIVE" & FAMILY == "CENTRARCHIDAE"], na.rm = TRUE), nt_natinsctCypr = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & NATIVE == "NATIVE" & TROPHIC_IS == TRUE & FAMILY == "CYPRINIDAE"], na.rm = TRUE), nt_natrbs = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & NATIVE == "NATIVE" & TYPE == "RBS"], na.rm = TRUE), nt_Petro = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & FAMILY == "PETROMYZONTIDAE"], na.rm = TRUE), nt_Salm = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & FAMILY == "SALMONIDAE"], na.rm = TRUE), nt_connect = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & CONNECTIVITY == TRUE], na.rm = TRUE), nt_scc = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & SCC == TRUE], na.rm = TRUE), nt_beninsct_nows_nobg = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TROPHIC_IS == TRUE & (TAXAID != "CATOSTOMUS COMMERSONII" | TAXAID != "LEPOMIS MACROCHIRUS" | is.na(TAXAID))], na.rm = TRUE), nt_trout_sunfish_notoler = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & ("TROUT" %in% TYPE | TYPE == "SUNFISH") & (TOLER != "TOLERANT" | is.na(TOLER))], na.rm = TRUE), pt_AmmEthPerc = 100 * nt_AmmEthPerc/nt_total, pt_AmmEthPerc_Cott_Notur = 100 * nt_AmmEthPerc_Cott_Notur/nt_total, pt_Cato = 100 * nt_Cato/nt_total, pt_Cent = 100 * nt_Cent/nt_total, pt_natCent = 100 * nt_natCent/nt_total, pt_Cott = 100 * nt_Cott/nt_total, pt_Cyprin = 100 * nt_Cyprin/nt_total, pt_Ictal = 100 * nt_Ictal/nt_total, pt_Lepomis = 100 * nt_Lepomis/nt_total, pt_native = 100 * nt_native/nt_total, pt_nonnative = 100 * nt_nonnative/nt_total, pt_Notur = 100 * nt_Notur/nt_total, pt_Salm = 100 * nt_Salm/nt_total, pt_connect = 100 * nt_connect/nt_total, pt_scc = 100 * nt_scc/nt_total, nt_beninvert = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TYPE == "BENTHIC" & TROPHIC_IV == TRUE], na.rm = TRUE), nt_habitat_beninvert = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TROPHIC_IV == TRUE & HABITAT_B == TRUE], na.rm = TRUE), nt_detritivore = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TROPHIC_DE == TRUE], na.rm = TRUE), nt_herbivore = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TROPHIC_HB == TRUE], na.rm = TRUE), nt_omnivore = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TROPHIC_OM == TRUE], na.rm = TRUE), nt_planktivore = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TROPHIC_PL == TRUE], na.rm = TRUE), nt_topcarn = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TROPHIC_TC == TRUE], na.rm = TRUE), nt_piscivore = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TROPHIC_PI == TRUE], na.rm = TRUE), pi_lithophil = 100 * sum(N_TAXA[SILT == TRUE], na.rm = TRUE)/ni_total, pi_habitat_beninvert = 100 * sum(N_TAXA[TROPHIC_IV == TRUE & HABITAT_B == TRUE], na.rm = TRUE)/ni_total, pi_detritivore = 100 * sum(N_TAXA[TROPHIC_DE == TRUE], na.rm = TRUE)/ni_total, pi_genomninvrt = 100 * sum(N_TAXA[TROPHIC_GE == TRUE | TROPHIC_OM == TRUE | TROPHIC_IV == TRUE], na.rm = TRUE)/ni_total, pi_herbivore = 100 * sum(N_TAXA[TROPHIC_HB == TRUE], na.rm = TRUE)/ni_total, pi_insectivore = 100 * sum(N_TAXA[TROPHIC_IS == TRUE], na.rm = TRUE)/ni_total, pi_insctCypr = 100 * sum(N_TAXA[TROPHIC_IS == TRUE & FAMILY == "CYPRINIDAE"], na.rm = TRUE)/ni_total, pi_gen = 100 * sum(N_TAXA[TROPHIC_GE == TRUE], na.rm = TRUE)/ni_total, pi_genherb = 100 * sum(N_TAXA[TROPHIC_GE == TRUE | TROPHIC_HB == TRUE], na.rm = TRUE)/ni_total, pi_omnivore = 100 * sum(N_TAXA[TROPHIC_OM == TRUE], na.rm = TRUE)/ni_total, pi_planktivore = 100 * sum(N_TAXA[TROPHIC_PL == TRUE], na.rm = TRUE)/ni_total, pi_topcarn = 100 * sum(N_TAXA[TROPHIC_TC == TRUE], na.rm = TRUE)/ni_total, pi_trout = 100 * sum(N_TAXA["TROUT" %in% TYPE], na.rm = TRUE)/ni_total, pi_pisc_noae = 100 * sum(N_TAXA[TYPE == "PISCIVORE" & (TAXAID != "ANGUILLA ROSTRATA" | is.na(TAXAID))], na.rm = TRUE)/ni_total, pt_habitat_beninvert = 100 * nt_habitat_beninvert/nt_total, pt_detritivore = 100 * nt_detritivore/nt_total, pt_herbivore = 100 * nt_herbivore/nt_total, pt_omnivore = 100 * nt_omnivore/nt_total, pt_planktivore = 100 * nt_planktivore/nt_total, pt_topcarn = 100 * nt_topcarn/nt_total, nt_tv_intol = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TOLER == "INTOLERANT"], na.rm = TRUE), nt_tv_intolhwi = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (TOLER == "INTOLERANT" | TOLER == "HWI")], na.rm = TRUE), pi_tv_toler = 100 * sum(N_TAXA[TOLER == "TOLERANT"], na.rm = TRUE)/ni_total, x_Shan_e = -sum((N_TAXA/ni_total) * log((N_TAXA/ni_total)), na.rm = TRUE), x_Shan_2 = x_Shan_e/log(2), x_Shan_10 = x_Shan_e/log(10), x_Evenness = x_Shan_e/log(nt_total), x_Evenness100_ni99gt = ifelse(ni_total < 100, 1, x_Evenness * 100), length_m = max(SAMP_LENGTH_M, na.rm = TRUE), area_m2 = max(SAMP_WIDTH_M, na.rm = TRUE) * length_m, ni_m2 = ni_total/area_m2, ni_200m = 200 * ni_total/length_m, ni_natnonhybridnonmf_200m = 200 * ni_natnonhybridnonmf/length_m, ni_natnonhybridnonmfnonLepomis_200m = 200 * ni_natnonhybridnonmfnonLepomis/length_m, biomass_m2 = max(SAMP_BIOMASS, na.rm = TRUE)/area_m2, pi_anomalies = 100 * sum(N_ANOMALIES, na.rm = TRUE)/ni_total, pi_delt = 100 * sum(N_ANOMALIES, na.rm = TRUE)/ni_total, pi_dom01 = 100 * max(N_TAXA, na.rm = TRUE)/ni_total, pi_dom02 = 100 * max(ni_dom02, na.rm = TRUE)/ni_total, pi_dom03 = 100 * max(ni_dom03, na.rm = TRUE)/ni_total, pi_dom04 = 100 * max(ni_dom04, na.rm = TRUE)/ni_total, pi_dom05 = 100 * max(ni_dom05, na.rm = TRUE)/ni_total, pi_dom06 = 100 * max(ni_dom06, na.rm = TRUE)/ni_total, pi_dom07 = 100 * max(ni_dom07, na.rm = TRUE)/ni_total, pi_dom08 = 100 * max(ni_dom08, na.rm = TRUE)/ni_total, pi_dom09 = 100 * max(ni_dom09, na.rm = TRUE)/ni_total, pi_dom10 = 100 * max(ni_dom10, na.rm = TRUE)/ni_total, nt_BCG_att1 = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & BCG_ATTR == "1"], na.rm = TRUE), nt_BCG_att12 = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "1" | BCG_ATTR == "2")], na.rm = TRUE), nt_BCG_att123 = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3")], na.rm = TRUE), nt_BCG2_att123b = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR2 == "3_BETTER")], na.rm = TRUE), nt_BCG_att1234 = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "4")], na.rm = TRUE), nt_BCG2_att1234b = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR2 == "4_BETTER")], na.rm = TRUE), nt_BCG_att1236 = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "6")], na.rm = TRUE), nt_BCG_att1236b = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "6B")], na.rm = TRUE), nt_BCG_att12346 = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "4" | BCG_ATTR == "6")], na.rm = TRUE), nt_BCG_att12346b = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "4" | BCG_ATTR == "6B")], na.rm = TRUE), nt_BCG_att1i236i = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "1I" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "6I")], na.rm = TRUE), nt_BCG_att2 = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & BCG_ATTR == "2"], na.rm = TRUE), nt_BCG_att2native = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & BCG_ATTR == "2" & NATIVE == "NATIVE"], na.rm = TRUE), nt_BCG_att23_scc = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "2" | BCG_ATTR == "3") & SCC == TRUE], na.rm = TRUE), nt_BCG_att3 = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & BCG_ATTR == "3"], na.rm = TRUE), nt_BCG_att3native = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & BCG_ATTR == "3" & NATIVE == "NATIVE"], na.rm = TRUE), nt_BCG_att4 = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & BCG_ATTR == "4"], na.rm = TRUE), nt_BCG_att4native = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & BCG_ATTR == "4" & NATIVE == "NATIVE"], na.rm = TRUE), nt_BCG_att5 = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & BCG_ATTR == "5"], na.rm = TRUE), nt_BCG_att5native = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & BCG_ATTR == "5" & NATIVE == "NATIVE"], na.rm = TRUE), nt_BCG_att55a6 = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "5" | BCG_ATTR == "5A" | BCG_ATTR == "6")], na.rm = TRUE), nt_BCG_att55a6a = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "5" | BCG_ATTR == "5A" | BCG_ATTR == "6A")], na.rm = TRUE), nt_BCG_att56t = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (BCG_ATTR == "5" | BCG_ATTR == "6T")], na.rm = TRUE), nt_BCG_att6i = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & BCG_ATTR == "6I"], na.rm = TRUE), nt_BCG_att6m = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & BCG_ATTR == "6M"], na.rm = TRUE), nt_BCG_att6t = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & BCG_ATTR == "6T"], na.rm = TRUE), nt_BCG_attNA = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & is.na(BCG_ATTR)], na.rm = TRUE), pi_BCG_att12 = 100 * sum(N_TAXA[(BCG_ATTR == "1" | BCG_ATTR == "2")], na.rm = TRUE)/ni_total, pi_BCG_att123 = 100 * sum(N_TAXA[(BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3")], na.rm = TRUE)/ni_total, pi_BCG_att1234 = 100 * sum(N_TAXA[(BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "4")], na.rm = TRUE)/ni_total, pi_BCG_att1236 = 100 * sum(N_TAXA[(BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "6")], na.rm = TRUE)/ni_total, pi_BCG_att1236sp = 100 * sum(N_TAXA[(BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "6")], na.rm = TRUE)/sum(N_TAXA[(BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "6" | BCG_ATTR == "5" | BCG_ATTR == "5A" | BCG_ATTR == "6A")], na.rm = TRUE), pi_BCG_att1236b = 100 * sum(N_TAXA[(BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "6B")], na.rm = TRUE)/ni_total, pi_BCG_att12346b = 100 * sum(N_TAXA[(BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "4" | BCG_ATTR == "6B")], na.rm = TRUE)/ni_total, pi_BCG_att1i236i = 100 * sum(N_TAXA[(BCG_ATTR == "1I" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "6I")], na.rm = TRUE)/ni_total, pi_BCG_att2 = 100 * sum(N_TAXA[BCG_ATTR == "2"], na.rm = TRUE)/ni_total, pi_BCG_att2native = 100 * sum(N_TAXA[BCG_ATTR == "2" & NATIVE == "NATIVE"], na.rm = TRUE)/ni_total, pi_BCG_att23_scc = 100 * sum(N_TAXA[(BCG_ATTR == "2" | BCG_ATTR == "3") & SCC == TRUE], na.rm = TRUE)/ni_total, pi_BCG_att3 = 100 * sum(N_TAXA[BCG_ATTR == "3"], na.rm = TRUE)/ni_total, pi_BCG_att3native = 100 * sum(N_TAXA[BCG_ATTR == "3" & NATIVE == "NATIVE"], na.rm = TRUE)/ni_total, pi_BCG_att4 = 100 * sum(N_TAXA[BCG_ATTR == "4"], na.rm = TRUE)/ni_total, pi_BCG_att4native = 100 * sum(N_TAXA[BCG_ATTR == "4" & NATIVE == "NATIVE"], na.rm = TRUE)/ni_total, pi_BCG_att5 = 100 * sum(N_TAXA[BCG_ATTR == "5"], na.rm = TRUE)/ni_total, pi_BCG_att5native = 100 * sum(N_TAXA[BCG_ATTR == "5" & NATIVE == "NATIVE"], na.rm = TRUE)/ni_total, pi_BCG_att55a6a = 100 * sum(N_TAXA[(BCG_ATTR == "5" | BCG_ATTR == "5A" | BCG_ATTR == "6A")], na.rm = TRUE)/ni_total, pi_BCG_att56a = 100 * sum(N_TAXA[(BCG_ATTR == "5" | BCG_ATTR == "6A")], na.rm = TRUE)/ni_total, pi_BCG_att5a6a = 100 * sum(N_TAXA[(BCG_ATTR == "5A" | BCG_ATTR == "6A")], na.rm = TRUE)/ni_total, pi_BCG_att56t = 100 * sum(N_TAXA[(BCG_ATTR == "5" | BCG_ATTR == "6T")], na.rm = TRUE)/ni_total, pi_BCG_att6 = 100 * sum(N_TAXA[BCG_ATTR == "6"], na.rm = TRUE)/ni_total, pi_BCG_att6i = 100 * sum(N_TAXA[BCG_ATTR == "6I"], na.rm = TRUE)/ni_total, pi_BCG_att6m = 100 * sum(N_TAXA[BCG_ATTR == "6M"], na.rm = TRUE)/ni_total, pi_BCG_att6t = 100 * sum(N_TAXA[BCG_ATTR == "6T"], na.rm = TRUE)/ni_total, pi_BCG_att66a = 100 * sum(N_TAXA[(BCG_ATTR == "6" | BCG_ATTR == "6A")], na.rm = TRUE)/ni_total, pi_BCG_att66a6b = 100 * sum(N_TAXA[(BCG_ATTR == "6" | BCG_ATTR == "6A" | BCG_ATTR == "6B")], na.rm = TRUE)/ni_total, pi_BCG_att66s6t = 100 * sum(N_TAXA[BCG_ATTR == "6" | BCG_ATTR == "6S" | BCG_ATTR == "6T"], na.rm = TRUE)/ni_total, pi_BCG_attNA = 100 * sum(N_TAXA[is.na(BCG_ATTR)], na.rm = TRUE)/ni_total, pt_BCG_att12 = 100 * nt_BCG_att12/nt_total, pt_BCG_att123 = 100 * nt_BCG_att123/nt_total, pt_BCG2_att123b = 100 * nt_BCG2_att123b/nt_total, pt_BCG_att1234 = 100 * nt_BCG_att1234/nt_total, pt_BCG2_att1234b = 100 * nt_BCG2_att1234b/nt_total, pt_BCG_att1236 = 100 * nt_BCG_att1236/nt_total, pt_BCG_att1236b = 100 * nt_BCG_att1236b/nt_total, pt_BCG_att1236sp = 100 * nt_BCG_att1236/(nt_BCG_att1236 + nt_BCG_att55a6a), pt_BCG_att12346b = 100 * nt_BCG_att12346b/nt_total, pt_BCG_att1i236i = 100 * nt_BCG_att1i236i/nt_total, pt_BCG_att2 = 100 * nt_BCG_att2/nt_total, pt_BCG_att2native = 100 * nt_BCG_att2native/nt_total, pt_BCG_att23_scc = 100 * nt_BCG_att23_scc/nt_total, pt_BCG_att3 = 100 * nt_BCG_att3/nt_total, pt_BCG_att3native = 100 * nt_BCG_att3native/nt_total, pt_BCG_att4 = 100 * nt_BCG_att4/nt_total, pt_BCG_att4native = 100 * nt_BCG_att4native/nt_total, pt_BCG_att5 = 100 * nt_BCG_att5/nt_total, pt_BCG_att5native = 100 * nt_BCG_att5native/nt_total, pt_BCG_att55a6a = 100 * nt_BCG_att55a6/nt_total, pt_BCG_att56t = 100 * nt_BCG_att56t/nt_total, pt_BCG_att6i = 100 * nt_BCG_att6i/nt_total, pt_BCG_att6m = 100 * nt_BCG_att6m/nt_total, pt_BCG_att6t = 100 * nt_BCG_att6t/nt_total, pt_BCG_attNA = 100 * nt_BCG_attNA/nt_total, pi_dom01_BCG_att4 = 100 * max(0, N_TAXA[(BCG_ATTR == "4")], na.rm = TRUE)/ni_total, pi_dom01_BCG_att45 = 100 * max(0, N_TAXA[(BCG_ATTR == "4" | BCG_ATTR == "5")], na.rm = TRUE)/ni_total, pi_dom01_BCG_att5 = 100 * max(0, N_TAXA[(BCG_ATTR == "5")], na.rm = TRUE)/ni_total, pi_dom01_BCG_att5a = 100 * max(0, N_TAXA[(BCG_ATTR == "5A")], na.rm = TRUE)/ni_total, pi_dom01_BCG_att5a6a = 100 * max(0, N_TAXA[(BCG_ATTR == "5A" | BCG_ATTR == "6A")], na.rm = TRUE)/ni_total, pi_dom01_BCG_att566a = 100 * max(0, N_TAXA[(BCG_ATTR == "5" | BCG_ATTR == "6" | BCG_ATTR == "6A")], na.rm = TRUE)/ni_total, nt_ti_corecold = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TI_CORECOLD == TRUE], na.rm = TRUE), nt_ti_cold = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TI_COLD == TRUE], na.rm = TRUE), nt_ti_cool = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TI_COOL == TRUE], na.rm = TRUE), nt_ti_warm = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TI_WARM == TRUE], na.rm = TRUE), nt_ti_eury = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TI_EURY == TRUE], na.rm = TRUE), nt_ti_na = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TI_NA == TRUE], na.rm = TRUE), nt_ti_corecold_cold = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (TI_CORECOLD == TRUE | TI_COLD == TRUE)], na.rm = TRUE), nt_ti_cool_warm = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (TI_COOL == TRUE | TI_WARM == TRUE)], na.rm = TRUE), pi_ti_corecold = 100 * sum(N_TAXA[TI_CORECOLD == TRUE], na.rm = TRUE)/ni_total, pi_ti_cold = 100 * sum(N_TAXA[TI_COLD == TRUE], na.rm = TRUE)/ni_total, pi_ti_cool = 100 * sum(N_TAXA[TI_COOL == TRUE], na.rm = TRUE)/ni_total, pi_ti_warm = 100 * sum(N_TAXA[TI_WARM == TRUE], na.rm = TRUE)/ni_total, pi_ti_eury = 100 * sum(N_TAXA[TI_EURY == TRUE], na.rm = TRUE)/ni_total, pi_ti_na = 100 * sum(N_TAXA[TI_NA == TRUE], na.rm = TRUE)/ni_total, pi_ti_corecold_cold = 100 * sum(N_TAXA[TI_CORECOLD == TRUE | TI_COLD == TRUE], na.rm = TRUE)/ni_total, pi_ti_cool_warm = 100 * sum(N_TAXA[TI_COOL == TRUE | TI_WARM == TRUE], na.rm = TRUE)/ni_total, pt_ti_corecold = 100 * nt_ti_corecold/nt_total, pt_ti_cold = 100 * nt_ti_cold/nt_total, pt_ti_cool = 100 * nt_ti_cool/nt_total, pt_ti_warm = 100 * nt_ti_warm/nt_total, pt_ti_eury = 100 * nt_ti_eury/nt_total, pt_ti_na = 100 * nt_ti_na/nt_total, pt_ti_corecold_cold = 100 * nt_ti_corecold_cold/nt_total, pt_ti_cool_warm = 100 * nt_ti_cool_warm/nt_total, nt_elev_low = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & ELEVATION_LOW == TRUE], na.rm = TRUE), nt_elev_high = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & ELEVATION_HIGH == TRUE], na.rm = TRUE), nt_grad_low = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & GRADIENT_LOW == TRUE], na.rm = TRUE), nt_grad_mod = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & GRADIENT_MOD == TRUE], na.rm = TRUE), nt_grad_high = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & GRADIENT_HIGH == TRUE], na.rm = TRUE), nt_wsarea_small = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & WSAREA_S == TRUE], na.rm = TRUE), nt_wsarea_medium = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & WSAREA_M == TRUE], na.rm = TRUE), nt_wsarea_large = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & WSAREA_L == TRUE], na.rm = TRUE), nt_wsarea_xlarge = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & WSAREA_XL == TRUE], na.rm = TRUE), nt_repro_broadcaster = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & REPRO_BCAST == TRUE], na.rm = TRUE), nt_repro_nestsimp = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & REPRO_NS == TRUE], na.rm = TRUE), nt_repro_nestcomp = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & REPRO_NC == TRUE], na.rm = TRUE), nt_repro_bearer = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & REPRO_BEAR == TRUE], na.rm = TRUE), nt_repro_migratory = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & REPRO_MIG == TRUE], na.rm = TRUE), nt_repro_lithophil = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & REPRO_LITH == TRUE], na.rm = TRUE), pi_repro_lithophil = 100 * sum(N_TAXA[REPRO_LITH == TRUE], na.rm = TRUE)/ni_total, pt_repro_lithophil = 100 * nt_repro_lithophil/nt_total, nt_habitat_b = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & HABITAT_B == TRUE], na.rm = TRUE), nt_habitat_w = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & HABITAT_W == TRUE], na.rm = TRUE), nt_habitat_f = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & HABITAT_F == TRUE], na.rm = TRUE), pi_habitat_b = 100 * sum(N_TAXA[HABITAT_B == TRUE], na.rm = TRUE)/ni_total, pi_habitat_w = 100 * sum(N_TAXA[HABITAT_W == TRUE], na.rm = TRUE)/ni_total, pi_habitat_f = 100 * sum(N_TAXA[HABITAT_F == TRUE], na.rm = TRUE)/ni_total, pt_habitat_b = 100 * nt_habitat_b/nt_total, pt_habitat_w = 100 * nt_habitat_w/nt_total, pt_habitat_f = 100 * nt_habitat_f/nt_total, nt_piscivore_BCG_att66s6t = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TROPHIC_PI == TRUE & (BCG_ATTR == "6" | BCG_ATTR == "6S" | BCG_ATTR == "6T")], na.rm = TRUE), nt_LLNLB = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TYPE == "LLNLB"], na.rm = TRUE), nt_Cyprin_BCG_att1234 = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & FAMILY == "CYPRINIDAE" & (BCG_ATTR == "1" | BCG_ATTR == "2" | BCG_ATTR == "3" | BCG_ATTR == "4")], na.rm = TRUE), ni_Hybognathus_amarus = sum(N_TAXA[TAXAID == "HYBOGNATHUS AMARUS"], na.rm = TRUE), x_TrophicCats = dplyr::n_distinct(TROPHIC, na.rm = TRUE), x_BCG_Mean = mean(TOLVAL2, na.rm = TRUE), nt_PupKilli = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (TAXAID == "CYPRINODON RUBROFLUVIATILIS" | TAXAID == "FUNDULUS KANSAE" | TAXAID == "FUNDULUS ZEBRINUS")], na.rm = TRUE), ni_total_ExclSchool = sum(N_TAXA[TYPE_SCHOOL != TRUE], na.rm = TRUE), ni_total_notoler_mn = sum(N_TAXA[TOLER_T != TRUE], na.rm = TRUE), nt_coldwater = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & HABITAT_CW == TRUE], na.rm = TRUE), nt_natcoldwater = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & HABITAT_CWN == TRUE], na.rm = TRUE), nt_hw_notoler = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & HABITAT_HW_noT == TRUE], na.rm = TRUE), nt_serialspawner = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & REPRO_SER == TRUE], na.rm = TRUE), nt_simplelithophil = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & REPRO_SILI == TRUE], na.rm = TRUE), nt_tv_sens = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TOLER_S == TRUE], na.rm = TRUE), nt_tv_senscoldwater = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TOLER_SCW == TRUE], na.rm = TRUE), nt_tv_tolercoldwater = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TOLER_TCW == TRUE], na.rm = TRUE), nt_tv_toler = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TOLER_T == TRUE], na.rm = TRUE), nt_tv_vtoler = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TOLER_VT == TRUE], na.rm = TRUE), nt_beninsct_notoler = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TROPHIC_BI_noT == TRUE], na.rm = TRUE), nt_detritivore = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TROPHIC_DE == TRUE], na.rm = TRUE), nt_gen = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TROPHIC_GE == TRUE], na.rm = TRUE), nt_insectivore_notoler = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TROPHIC_IN_noT == TRUE], na.rm = TRUE), nt_omnivore = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TROPHIC_OM == TRUE], na.rm = TRUE), nt_dartersculpin = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TYPE_DS == TRUE], na.rm = TRUE), nt_darterscultpinsucker = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TYPE_DSS == TRUE], na.rm = TRUE), nt_pioneer = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TYPE_PI == TRUE], na.rm = TRUE), nt_shortlived = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & TYPE_SL == TRUE], na.rm = TRUE), pi_hw_notoler_ExclSchool = 100 * sum(N_TAXA[HABITAT_HW_noT == TRUE & TYPE_SCHOOL == FALSE], na.rm = TRUE)/ni_total_ExclSchool, pi_wetland_notoler_ExclSchool = 100 * sum(N_TAXA[HABITAT_WE_noT == TRUE & TYPE_SCHOOL == FALSE], na.rm = TRUE)/ni_total_ExclSchool, pi_natcoldwater_ExclSchool = 100 * sum(N_TAXA[HABITAT_CWN == TRUE & TYPE_SCHOOL == FALSE], na.rm = TRUE)/ni_total_ExclSchool, pi_ma2_ExclShool = 100 * sum(N_TAXA[REPRO_MA2 == TRUE & TYPE_SCHOOL == FALSE], na.rm = TRUE)/ni_total_ExclSchool, pi_ma3_notoler_ExclSchool = 100 * sum(N_TAXA[REPRO_MA3_noT == TRUE & TYPE_SCHOOL == FALSE], na.rm = TRUE)/ni_total_ExclSchool, pi_nonlithophil_ExclSchool = 100 * sum(N_TAXA[REPRO_NE == TRUE & TYPE_SCHOOL == FALSE], na.rm = TRUE)/ni_total_ExclSchool, pi_serialspawner_ExclSchool = 100 * sum(N_TAXA[REPRO_SER == TRUE & TYPE_SCHOOL == FALSE], na.rm = TRUE)/ni_total_ExclSchool, pi_simplelithophil_ExclSchool = 100 * sum(N_TAXA[REPRO_SILI == TRUE & TYPE_SCHOOL == FALSE], na.rm = TRUE)/ni_total_ExclSchool, pi_detritivore_ExclSchool = 100 * sum(N_TAXA[TROPHIC_DE == TRUE & TYPE_SCHOOL == FALSE], na.rm = TRUE)/ni_total_ExclSchool, pi_gen_ExclSchool = 100 * sum(N_TAXA[TROPHIC_GE == TRUE & TYPE_SCHOOL == FALSE], na.rm = TRUE)/ni_total_ExclSchool, pi_herbivore_ExclSchool = 100 * sum(N_TAXA[TROPHIC_HB == TRUE & TYPE_SCHOOL == FALSE], na.rm = TRUE)/ni_total_ExclSchool, pi_insctCypr_ExclSchool = 100 * sum(N_TAXA[TROPHIC_IN_CYP == TRUE & TYPE_SCHOOL == FALSE], na.rm = TRUE)/ni_total_ExclSchool, pi_insectivore_notoler_ExclSchool = 100 * sum(N_TAXA[TROPHIC_IN_noT == TRUE & TYPE_SCHOOL == FALSE], na.rm = TRUE)/ni_total_ExclSchool, pi_piscivore_ExclSchool = 100 * sum(N_TAXA[TROPHIC_PI == TRUE & TYPE_SCHOOL == FALSE], na.rm = TRUE)/ni_total_ExclSchool, pi_tv_intol_ExclSchool = 100 * sum(N_TAXA[TOLER_I == TRUE & TYPE_SCHOOL == FALSE], na.rm = TRUE)/ni_total_ExclSchool, pi_tv_intolcoldwater_ExclSchool = 100 * sum(N_TAXA[TOLER_ICW == TRUE & TYPE_SCHOOL == FALSE], na.rm = TRUE)/ni_total_ExclSchool, pi_tv_sens_ExclSchool = 100 * sum(N_TAXA[TOLER_S == TRUE & TYPE_SCHOOL == FALSE], na.rm = TRUE)/ni_total_ExclSchool, pi_tv_senscoldwater_ExclSchool = 100 * sum(N_TAXA[TOLER_SCW == TRUE & TYPE_SCHOOL == FALSE], na.rm = TRUE)/ni_total_ExclSchool, pi_tv_toler_ExclSchool = 100 * sum(N_TAXA[TOLER_T == TRUE & TYPE_SCHOOL == FALSE], na.rm = TRUE)/ni_total_ExclSchool, pi_tv_tolercoldwater_ExclSchool = 100 * sum(N_TAXA[TOLER_TCW == TRUE & TYPE_SCHOOL == FALSE], na.rm = TRUE)/ni_total_ExclSchool, pi_exotic_ExclSchool = 100 * sum(N_TAXA[TYPE_EX == TRUE & TYPE_SCHOOL == FALSE], na.rm = TRUE)/ni_total_ExclSchool, pi_minnow_notoler_ExclSchool = 100 * sum(N_TAXA[TYPE_MIN_noT == TRUE & TYPE_SCHOOL == FALSE], na.rm = TRUE)/ni_total_ExclSchool, pi_Perciformes_ExclSchool = 100 * sum(N_TAXA[TYPE_PERC == TRUE & TYPE_SCHOOL == FALSE], na.rm = TRUE)/ni_total_ExclSchool, pi_pioneer_ExclShool = 100 * sum(N_TAXA[TYPE_PI == TRUE & TYPE_SCHOOL == FALSE], na.rm = TRUE)/ni_total_ExclSchool, pi_shortlived_ExclSchool = 100 * sum(N_TAXA[TYPE_SL == TRUE & TYPE_SCHOOL == FALSE], na.rm = TRUE)/ni_total_ExclSchool, pi_dom02_ExclSchool = 100 * max(ni_dom02_ExclSchool, na.rm = TRUE)/ni_total_ExclSchool, pt_natcoldwater = 100 * nt_natcoldwater/nt_total, pt_serialspawner = 100 * nt_serialspawner/nt_total, pt_simplelithophil = 100 * nt_simplelithophil/nt_total, pt_tv_sens = 100 * nt_tv_sens/nt_total, pt_tv_senscoldwater = 100 * nt_tv_senscoldwater/nt_total, pt_tv_toler = 100 * nt_tv_toler/nt_total, pt_tv_vtoler = 100 * nt_tv_vtoler/nt_total, pt_beninsct_notoler = 100 * nt_beninsct_notoler/nt_total, pt_detritivore = 100 * nt_detritivore/nt_total, pt_gen = 100 * nt_gen/nt_total, pt_insectivore_notoler = 100 * nt_insectivore_notoler/nt_total, pt_omnivore = 100 * nt_omnivore/nt_total, pt_darterscultpinsucker = 100 * nt_darterscultpinsucker/nt_total, pt_pioneer = 100 * nt_pioneer/nt_total, ni_m2_notoler = ni_total_notoler_mn/area_m2, pi_delt_ExclSchool = 100 * sum(N_ANOMALIES[TYPE_SCHOOL != TRUE], na.rm = TRUE)/ni_total_ExclSchool): ℹ In argument: `x_BCG_Mean = mean(TOLVAL2, na.rm = TRUE)`.
#> ℹ In group 1: `SAMPLEID = "CHGX-432-S-1111"`, `INDEX_NAME = "MBSS_2005_Fish"`,
#> `INDEX_CLASS = "EPIEDMONT"`, `SAMP_WIDTH_M = 1.5`, `SAMP_LENGTH_M = 75`.
#> Caused by error: