ASCI

Marcus W. Beck, ; Susanna Theroux, ; Robert Butler (maintainer), ; Quynh-Thi Ho,

R package materials to calculate the Algal Stream Condition Index (ASCI) based on predictive MMI scores using diatom, soft-bodied algae, or a hybrid appproach.

Installation

Install the package as follows:

install.packages('devtools')
library(devtools)
install_github('SCCWRP/ASCI')
library(ASCI)

Usage

The sample files demo_algae_tax and demo_station are included to demonstrate the correct formats for the input data. The demo_algae_tax file is a data.frame of taxonomic data in long format (one row per sample). The demo_station file is a data.frame of GIS predictors in wide format, one row per station. See the help files for more information (e.g., ?demo_algae_tax). Also see the help file for chkinp() and calcgis() for requirements of each file to work with the ASCI.

head(demo_algae_tax)
head(demo_station)

The output is in a wide format.

demo_results <- ASCI(demo_algae_tax, demo_station)
demo_results
## # A tibble: 3 x 55
##   SampleID StationCode SampleDate          Replicate SampleType
##   <chr>    <chr>       <dttm>                  <int> <chr>     
## 1 404M073… 404M07357   2016-06-13 00:00:00         1 Integrate…
## 2 801M169… 801M16916   2016-05-25 00:00:00         1 Microalga…
## 3 909M249… 909M24937   2016-06-22 00:00:00         1 Macroalga…
## # … with 50 more variables: D_ValveCount <int>, S_EntityCount <int>,
## #   S_Biovolume <dbl>, D_NumberTaxa <dbl>, S_NumberTaxa <dbl>,
## #   H_NumberTaxa <dbl>, UnrecognizedTaxa <chr>, D_ASCI <dbl>,
## #   S_ASCI <dbl>, H_ASCI <dbl>, D_pct_att_prp_spp_BCG12 <dbl>,
## #   D_pct_att_prp_spp_OxRq_DO100_75 <dbl>,
## #   D_pct_att_prp_spp_Salinity_BF <dbl>,
## #   D_pct_att_prp_spp_Trophic_E <dbl>, D_prp_spp_BCG12_mod <dbl>,
## #   D_prp_spp_BCG12_mod_scr <dbl>, D_prp_spp_BCG12_pred <dbl>,
## #   D_prp_spp_OxRq_DO100_75_raw <dbl>,
## #   D_prp_spp_OxRq_DO100_75_raw_scr <dbl>,
## #   D_prp_spp_Salinity_BF_mod <dbl>, D_prp_spp_Salinity_BF_mod_scr <dbl>,
## #   D_prp_spp_Salinity_BF_pred <dbl>, D_prp_spp_Trophic_E_mod <dbl>,
## #   D_prp_spp_Trophic_E_mod_scr <dbl>, D_prp_spp_Trophic_E_pred <dbl>,
## #   H_OxRd_DO_30_richness_mod <dbl>, H_OxRd_DO_30_richness_mod_scr <dbl>,
## #   H_OxRd_DO_30_richness_pred <dbl>, H_pct_att_OxRd_DO_30_richness <dbl>,
## #   H_pct_att_prp_spp_BCG4 <dbl>, H_pct_att_prp_spp_IC_DOC_high <dbl>,
## #   H_pct_att_Salinity_BF_richness <dbl>, H_prp_spp_BCG4_mod <dbl>,
## #   H_prp_spp_BCG4_mod_scr <dbl>, H_prp_spp_BCG4_pred <dbl>,
## #   H_prp_spp_IC_DOC_high_raw <dbl>, H_prp_spp_IC_DOC_high_raw_scr <dbl>,
## #   H_Salinity_BF_richness_mod <dbl>,
## #   H_Salinity_BF_richness_mod_scr <dbl>,
## #   H_Salinity_BF_richness_pred <dbl>, S_cnt_spp_IC_DOC_high_raw <dbl>,
## #   S_cnt_spp_IC_DOC_high_raw_scr <dbl>,
## #   S_pct_att_cnt_spp_IC_DOC_high <dbl>, S_pct_att_prp_spp_BCG45 <dbl>,
## #   S_pct_att_prp_spp_Green <dbl>, S_prp_spp_BCG45_raw <dbl>,
## #   S_prp_spp_BCG45_raw_scr <dbl>, S_prp_spp_Green_raw <dbl>,
## #   S_prp_spp_Green_raw_scr <dbl>, Comments <chr>