This report is automatically generated with the R package knitr (version 1.40) .

source("R Functions/functions_QA data.R")

# LOAD DATA MASTER #
FishMaster <- readxl::read_excel('Reeval_Impl_Goals_Linkage_Analysis/Data/Fish/3a_FishMaster_GISdemarcated.xlsx', sheet=1, guess_max = 30000)
nrow(FishMaster)
## [1] 22382
FishMaster_DELTA <- FishMaster %>%
  filter(TMDL == "Delta",                         # Filter for Delta TMDL sites
         SampleDate >= as.Date('1998-01-01')) %>% # Remove fish data prior to 1998
  filter(TLAvgLength > 0) %>%                 # Remove fish with 0 length
  filter(CommonName != "Crangon Shrimp" & CommonName != "Crayfish") # Remove mollusks and invertebrates
nrow(FishMaster_DELTA)
## [1] 7719
fish_noLength <- FishMaster_DELTA %>%
  filter(is.na(TLAvgLength) | TLAvgLength == 0)
nrow(fish_noLength)               # check it is 0
## [1] 0
# SAVE FishMaster DELTA data #
writexl::write_xlsx(FishMaster_DELTA, path='Reeval_Impl_Goals_Linkage_Analysis/Data/Fish/4a_FishMaster_DELTAdata.xlsx')

The R session information (including the OS info, R version and all packages used):

    sessionInfo()
## R version 4.2.2 (2022-10-31 ucrt)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 10 x64 (build 22621)
## 
## Matrix products: default
## 
## locale:
## [1] LC_COLLATE=English_United States.utf8  LC_CTYPE=English_United States.utf8   
## [3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C                          
## [5] LC_TIME=English_United States.utf8    
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] lubridate_1.8.0    plotly_4.10.0      readxl_1.4.1       actuar_3.3-0      
##  [5] NADA_1.6-1.1       forcats_0.5.2      stringr_1.4.1      dplyr_1.0.9       
##  [9] purrr_0.3.4        readr_2.1.2        tidyr_1.2.0        tibble_3.1.8      
## [13] ggplot2_3.3.6      tidyverse_1.3.2    fitdistrplus_1.1-8 survival_3.4-0    
## [17] MASS_7.3-58.1     
## 
## loaded via a namespace (and not attached):
##  [1] lattice_0.20-45     assertthat_0.2.1    digest_0.6.29       utf8_1.2.2         
##  [5] R6_2.5.1            cellranger_1.1.0    backports_1.4.1     reprex_2.0.2       
##  [9] evaluate_0.16       highr_0.9           httr_1.4.4          pillar_1.8.1       
## [13] rlang_1.0.5         lazyeval_0.2.2      googlesheets4_1.0.1 rstudioapi_0.14    
## [17] data.table_1.14.2   Matrix_1.5-1        splines_4.2.2       googledrive_2.0.0  
## [21] htmlwidgets_1.5.4   munsell_0.5.0       broom_1.0.1         compiler_4.2.2     
## [25] modelr_0.1.9        xfun_0.32           pkgconfig_2.0.3     htmltools_0.5.3    
## [29] tidyselect_1.1.2    fansi_1.0.3         viridisLite_0.4.1   crayon_1.5.1       
## [33] tzdb_0.3.0          dbplyr_2.2.1        withr_2.5.0         grid_4.2.2         
## [37] jsonlite_1.8.0      gtable_0.3.1        lifecycle_1.0.1     DBI_1.1.3          
## [41] magrittr_2.0.3      scales_1.2.1        writexl_1.4.0       cli_3.3.0          
## [45] stringi_1.7.8       fs_1.5.2            xml2_1.3.3          ellipsis_0.3.2     
## [49] generics_0.1.3      vctrs_0.4.1         expint_0.1-7        tools_4.2.2        
## [53] glue_1.6.2          hms_1.1.2           fastmap_1.1.0       colorspace_2.0-3   
## [57] gargle_1.2.0        rvest_1.0.3         knitr_1.40          haven_2.5.1
    Sys.time()
## [1] "2024-01-05 08:36:30 PST"