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

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


# LOAD DATA MASTER # ----
FishMaster <- loadData('Reeval_Impl_Goals_Linkage_Analysis/Data/Fish/4a_FishMaster_DELTAdata.xlsx')
## Data set has 7719 rows. Added Shape column based on SourceID for use in result_time_Plotly().
str(FishMaster)
## tibble [7,719 × 42] (S3: tbl_df/tbl/data.frame)
##  $ TMDL             : chr [1:7719] "Delta" "Delta" "Delta" "Delta" ...
##  $ Subarea          : chr [1:7719] "West Delta" "West Delta" "West Delta" "West Delta" ...
##  $ SourceID         : chr [1:7719] "AppK" "AppK" "AppK" "AppK" ...
##  $ SourceRow        : num [1:7719] 245 246 247 248 249 250 251 252 253 254 ...
##  $ StationName      : chr [1:7719] "Big Break" "Big Break" "Big Break" "Big Break" ...
##  $ SampleDateTime   : POSIXct[1:7719], format: "2000-09-28" "2000-09-28" ...
##  $ Analyte          : chr [1:7719] "Mercury, Total" "Mercury, Total" "Mercury, Total" "Mercury, Total" ...
##  $ Result           : num [1:7719] 0.185 0.344 0.224 0.333 0.463 0.413 0.217 0.308 0.411 0.13 ...
##  $ MDL              : num [1:7719] NA NA NA NA NA NA NA NA NA NA ...
##  $ RL               : num [1:7719] NA NA NA NA NA NA NA NA NA NA ...
##  $ Unit             : chr [1:7719] "mg/Kg ww" "mg/Kg ww" "mg/Kg ww" "mg/Kg ww" ...
##  $ ResultQualCode   : chr [1:7719] NA NA NA NA ...
##  $ WBT              : chr [1:7719] "Not Recorded" "Not Recorded" "Not Recorded" "Not Recorded" ...
##  $ CommonName       : chr [1:7719] "Largemouth Bass" "Largemouth Bass" "Largemouth Bass" "Largemouth Bass" ...
##  $ TaxonomicName    : chr [1:7719] "Micropterus salmoides" "Micropterus salmoides" "Micropterus salmoides" "Micropterus salmoides" ...
##  $ NumberFishPerComp: chr [1:7719] "1" "1" "1" "1" ...
##  $ TissueName       : chr [1:7719] "Fillet" "Fillet" "Fillet" "Fillet" ...
##  $ WeightAvg        : chr [1:7719] NA NA NA NA ...
##  $ TLAvgLength      : chr [1:7719] "335" "349" "358" "361" ...
##  $ TLMin            : chr [1:7719] NA NA NA NA ...
##  $ TLMax            : chr [1:7719] NA NA NA NA ...
##  $ CompositeID      : chr [1:7719] NA NA NA NA ...
##  $ CompositeRowID   : chr [1:7719] NA NA NA NA ...
##  $ TargetLatitude   : num [1:7719] 38 38 38 38 38 ...
##  $ TargetLongitude  : num [1:7719] -122 -122 -122 -122 -122 ...
##  $ CoordSystem      : chr [1:7719] "NAD27" "NAD27" "NAD27" "NAD27" ...
##  $ QACode           : chr [1:7719] NA NA NA NA ...
##  $ SampleID         : chr [1:7719] "SampleID: 00-1596 Ind 3 ~ SampleID-Alt: Largemouth Bass Ind 9" "SampleID: 00-1596 Ind 1 ~ SampleID-Alt: Largemouth Bass Ind 7" "SampleID: 00-1596 Ind 2 ~ SampleID-Alt: Largemouth Bass Ind 8" "SampleID: 00-1598 Ind 4 ~ SampleID-Alt: Largemouth Bass Ind 6" ...
##  $ ResultComments   : chr [1:7719] "~ LengthType:  ~ LabQualHGppmWetWt:" "~ LengthType:  ~ LabQualHGppmWetWt:" "~ LengthType:  ~ LabQualHGppmWetWt:" "~ LengthType:  ~ LabQualHGppmWetWt:" ...
##  $ LabSubmissionCode: chr [1:7719] NA NA NA NA ...
##  $ Method           : chr [1:7719] NA NA NA NA ...
##  $ BatchVerification: chr [1:7719] NA NA NA NA ...
##  $ ComplianceCode   : chr [1:7719] NA NA NA NA ...
##  $ ProjectCode      : chr [1:7719] "SFEI-CALFED" "SFEI-CALFED" "SFEI-CALFED" "SFEI-CALFED" ...
##  $ ProgramName      : chr [1:7719] NA NA NA NA ...
##  $ ParentProjectName: chr [1:7719] NA NA NA NA ...
##  $ ProjectName      : chr [1:7719] NA NA NA NA ...
##  $ CitationCode     : chr [1:7719] "Davis, J.A, B.K. Greenfield, G. Ichikawa and M. Stephenson. 2003. Mercury in Sport Fish from the Delta Region. "| __truncated__ "Davis, J.A, B.K. Greenfield, G. Ichikawa and M. Stephenson. 2003. Mercury in Sport Fish from the Delta Region. "| __truncated__ "Davis, J.A, B.K. Greenfield, G. Ichikawa and M. Stephenson. 2003. Mercury in Sport Fish from the Delta Region. "| __truncated__ "Davis, J.A, B.K. Greenfield, G. Ichikawa and M. Stephenson. 2003. Mercury in Sport Fish from the Delta Region. "| __truncated__ ...
##  $ StationCode      : chr [1:7719] "GroupedSites: Big Break ~ DeltaSubRegion-NumTarget: West Delta ~ DeltaSubRegion-Linkage: X2" "GroupedSites: Big Break ~ DeltaSubRegion-NumTarget: West Delta ~ DeltaSubRegion-Linkage: X2" "GroupedSites: Big Break ~ DeltaSubRegion-NumTarget: West Delta ~ DeltaSubRegion-Linkage: X2" "GroupedSites: Big Break ~ DeltaSubRegion-NumTarget: West Delta ~ DeltaSubRegion-Linkage: X2" ...
##  $ SampleDate       : chr [1:7719] "2000-09-28" "2000-09-28" "2000-09-28" "2000-09-28" ...
##  $ SampleTime       : chr [1:7719] NA NA NA NA ...
##  $ Shape            : chr [1:7719] "cross-open" "cross-open" "cross-open" "cross-open" ...
# LOOK AT DATA FOR ANY NEGATIVE PATTERNS #
# result_time_Plotly(FishMaster, Subarea, showMean=F, interactive=F, logscale=T, showLegend=F)
#No immediate negative patterns seen


# PRECHECK DATA FOR MISSING VALUES # ----
#Any sites without a StationName?
anyBlank(FishMaster, "StationName") #Great! No Blanks
## The column "StationName" does not contain any blanks.
#Any sites with missing dates?
anyBlank(FishMaster, "SampleDateTime") #Great! No Blanks
## The column "SampleDateTime" does not contain any blanks.
#Initial ResultQualCode Check
temp <- FishMaster %>%
  filter(is.na(MDL) & is.na(RL) & ResultQualCode == 'ND') #this case could be '=' or 'ND'.
View(temp) #no instances

#see is ResultQualCode is consistent when Result == MDL
temp <- FishMaster %>%
  filter(Result == MDL)
View(temp)  #no instances

#see is ResultQualCode is consistent when Result == RL
temp <- FishMaster %>%
  filter(Result == RL)
View(temp)  #no instances

#MDLs should not be greater than RL
temp <- FishMaster %>%
  filter(MDL > RL)
View(temp)  #no instances


# STANDARDIZE RESULTQUALCODE # ----
# I created the function "standQualCode()" based on rules in "1_ResQualCode Rules.xlsx". The function is located in "5_Functions to QA Fish & Aq Data.R"
FishMaster_fixedQualCode <- standQualCode(FishMaster, ResultQualCode)
## 
## Dataset tested for the following logic:
##    !is.na(Result) & is.na(MDL) & is.na(RL) & ResultQualCode == "ND" 
## No instances found to be TRUE. No data removed.
## 
## 
## Dataset tested for the following logic:
##    is.na(Result) & (!is.na(MDL) & !is.na(RL)) & (ResultQualCode != "ND" & ResultQualCode != "DNQ") 
## No instances found to be TRUE. No data removed.
## 
## 
## Dataset tested for the following logic:
##    Result == RL & MDL < RL & ResultQualCode == "ND" 
## No instances found to be TRUE. No data removed.
## 
## 
##  ResultQualCode is now standardized and original QualCodes saved in column named origQualCode. The following 4170 rows have a blank value in the ResultQualCode column:  AppK, CEDENFish, DRMP_2016_CEDEN, DRMP_2017_Hg_Fish, DRMP_2018_Hg_Fish, DRMP_2019_Hg_Fish, R5MF, and SNIP
##     TMDL  Subarea    Sourc…¹ Sourc…² Stati…³ SampleDateTime      Analyte Result   MDL    RL
##   1 Delta West Delta AppK        245 Big Br… 2000-09-28 00:00:00 Mercur…  0.185    NA    NA
##   2 Delta West Delta AppK        246 Big Br… 2000-09-28 00:00:00 Mercur…  0.344    NA    NA
##   3 Delta West Delta AppK        247 Big Br… 2000-09-28 00:00:00 Mercur…  0.224    NA    NA
##   4 Delta West Delta AppK        248 Big Br… 2000-09-28 00:00:00 Mercur…  0.333    NA    NA
##   5 Delta West Delta AppK        249 Big Br… 2000-09-28 00:00:00 Mercur…  0.463    NA    NA
##   6 Delta West Delta AppK        250 Big Br… 2000-09-28 00:00:00 Mercur…  0.413    NA    NA
##   7 Delta West Delta AppK        251 Big Br… 2000-09-28 00:00:00 Mercur…  0.217    NA    NA
##   8 Delta West Delta AppK        252 Big Br… 2000-09-28 00:00:00 Mercur…  0.308    NA    NA
##   9 Delta West Delta AppK        253 Big Br… 2000-09-28 00:00:00 Mercur…  0.411    NA    NA
##  10 Delta West Delta AppK        254 Big Br… 2000-09-28 00:00:00 Mercur…  0.13     NA    NA
##  # … with 4,160 more rows, 3 more variables: Unit <chr>, origQualCode <chr>,
##  #   ResultQualCode <chr>, and abbreviated variable names ¹​SourceID, ²​SourceRow,
##  #   ³​StationName
##  
## Of the samples above, the following samples contain a Result but no MDL, RL, or QualCode and will be given a new QualCode of "=":
##   1 Delta West Delta AppK        245 Big Br… 2000-09-28 00:00:00 Mercur…  0.185    NA    NA
##   2 Delta West Delta AppK        246 Big Br… 2000-09-28 00:00:00 Mercur…  0.344    NA    NA
##   3 Delta West Delta AppK        247 Big Br… 2000-09-28 00:00:00 Mercur…  0.224    NA    NA
##   4 Delta West Delta AppK        248 Big Br… 2000-09-28 00:00:00 Mercur…  0.333    NA    NA
##   5 Delta West Delta AppK        249 Big Br… 2000-09-28 00:00:00 Mercur…  0.463    NA    NA
##   6 Delta West Delta AppK        250 Big Br… 2000-09-28 00:00:00 Mercur…  0.413    NA    NA
##   7 Delta West Delta AppK        251 Big Br… 2000-09-28 00:00:00 Mercur…  0.217    NA    NA
##   8 Delta West Delta AppK        252 Big Br… 2000-09-28 00:00:00 Mercur…  0.308    NA    NA
##   9 Delta West Delta AppK        253 Big Br… 2000-09-28 00:00:00 Mercur…  0.411    NA    NA
##  10 Delta West Delta AppK        254 Big Br… 2000-09-28 00:00:00 Mercur…  0.13     NA    NA
##  # … with 4,160 more rows, 3 more variables: Unit <chr>, origQualCode <chr>,
##  #   ResultQualCode <chr>, and abbreviated variable names ¹​SourceID, ²​SourceRow,
##  #   ³​StationName
## All samples now contain a standardized QualCode.
nrow(FishMaster_fixedQualCode)
## [1] 7719
View(anti_join(FishMaster, FishMaster_fixedQualCode, by=c("Result"="origResult", "MDL", "RL", "ResultQualCode"="origQualCode")))  # View all Data deleted from FishMaster; if no entries, no data was deleted from FishMaster


# STANDARDIZING WBT # ----
WBTs <- FishMaster_fixedQualCode %>%
  mutate(stationname = tolower(StationName),          # make StationNames all lowercase to remove capitalization varability
         origWBT = WBT) %>%                           # add origWBT to keep WBT for reference
  distinct(stationname, WBT, .keep_all = T) %>%
  select(SourceID, stationname, WBT, origWBT, TargetLatitude, TargetLongitude)

dupStationNameWBT <- WBTs %>%
  group_by(stationname) %>%
  mutate(n = n()) %>%
  filter(n() > 1,
         WBT %are not% c('Not Recorded', 'Other-Surface Water')) %>%   # Remove WBTs "Not Recorded" & "Other-Surface Water" so only WBT designations from same StationName remain
  distinct(stationname, .keep_all=T) %>%                               # Remove duplicate StationNames (having different WTBs) - Keeps top row - dupliates were causing duplication in left_join below
  select(stationname, WBT) %>%
  mutate(`Change Type` = 'From Duplicate StationName WBT')

# For WBT's "Not Recorded" & "Other-Surface Water" - use WBT designation from same StationName
WBTs2 <- WBTs %>%
  select(-WBT) %>%                                       # Remove WBT column 
  left_join(., dupStationNameWBT, by='stationname') %>%  # Adds 'Change Type' & WBT columns to replace WBT "Not Recorded" & "Other-Surface Water" with designations from a duplicate StationName if available 
  mutate(WBT = ifelse(is.na(WBT), origWBT, WBT),         # fill in blank WBTs with origWBT designaions  
         `Change Type` = ifelse(WBT == origWBT, NA_character_, `Change Type`)) %>%
  arrange(stationname)

# Use WBT's identified in AqMaster
AqMasterWBTs <- readxl::read_excel('Reeval_Impl_Goals_Linkage_Analysis/Data/Aqueous/5b.2_WBTs_ManuallyStandardized.xlsx', sheet=1, guess_max = 30000) %>%
  select(stationname, WBT) %>%
  rename(WBT2 = WBT) %>%
  mutate(`Change Type Aq` = "From StationName WBT in AqMaster")

WBTs3 <- WBTs2 %>%
  left_join(., AqMasterWBTs, by='stationname') %>%         # Adds 'Change Type Aq' & WBT2 columns to add WBTs consitent with those already standardized in AqMaster
  mutate(`Change Type` = ifelse(WBT == WBT2 | is.na(WBT2), `Change Type`, `Change Type Aq`),  # replace 'Change Type' with "From StationName WBT in AqMaster"
         WBT           = ifelse(WBT == WBT2 | is.na(WBT2), WBT, WBT2)) %>%                    # fill in WBTs with changes from AqMaster WBT designaions 
  select(-`Change Type Aq`, -WBT2) %>%
  arrange(stationname)
View(WBTs3)
writexl::write_xlsx(WBTs3, path='Reeval_Impl_Goals_Linkage_Analysis/Data/Fish/5b.1_WBTs_ToBeStandardized.xlsx')

## Add fixed WBTs into master data ----
fixedWBTs <- readxl::read_excel('Reeval_Impl_Goals_Linkage_Analysis/Data/Fish/5b.2_WBTs_ManuallyStandardized.xlsx', sheet=1, guess_max = 30000) %>%
  select(stationname, tempWBT = WBT)  %>%    # change name of WBT column so easier to keep track of new & old WBTs below
  distinct(stationname, .keep_all=T)
nrow(fixedWBTs) == length(unique(fixedWBTs$stationname))
## [1] TRUE
FishMaster_fixedWBT <- FishMaster_fixedQualCode %>%
  mutate(stationname = tolower(StationName)) %>%
  left_join(., fixedWBTs, by='stationname') %>% # adds fixed 'tempWBT' column as last column
  mutate(origWBT = WBT,                         # move original WBTs to last column
         WBT     = tempWBT) %>%                 # move fixed 'WBT' column to original WBT location
  select(-tempWBT, -stationname)
nrow(FishMaster_fixedWBT)
## [1] 7719
# Common Names ----
## Make the adjustments so common names match ----
FishMaster_samenames <- FishMaster_fixedWBT %>%
  mutate(CommonName = case_when(CommonName == "Carp" ~ "Common Carp",
                                CommonName == "Bullfrog (tadpole)" ~ "Bullfrog Tadpole",
                                CommonName == "Catfish" ~ "Channel Catfish",
                                CommonName == "Crayfish4" ~ "Crayfish",
                                CommonName == "Sacramento Pike Minnow" ~ "Sacramento Pikeminnow",
                                CommonName == "Smallmouth bass" ~ "Smallmouth Bass",
                                TRUE ~ CommonName))

## Check to make sure the names were changed
FishMaster_samenames %>% unique_factors(CommonName)
## $CommonName
##  [1] "American Shad"           "Bigscale Logperch"       "Black Bullhead"         
##  [4] "Black Crappie"           "Bluegill"                "Brown Bullhead"         
##  [7] "Channel Catfish"         "Chinook Salmon"          "Common Carp"            
## [10] "Crappie"                 "Golden Shiner"           "Goldfish"               
## [13] "Hitch"                   "Largemouth Bass"         "Mosquitofish"           
## [16] "Prickly Sculpin"         "Red Shiner"              "Redear Sunfish"         
## [19] "Sacramento Blackfish"    "Sacramento Perch"        "Sacramento Pikeminnow"  
## [22] "Sacramento Splittail"    "Sacramento Sucker"       "Shimofuri Goby"         
## [25] "Silverside"              "Smallmouth Bass"         "Splittail"              
## [28] "Spotted Bass"            "Steelhead Rainbow Trout" "Steelhead Trout"        
## [31] "Striped Bass"            "Threadfin Shad"          "Tule Perch"             
## [34] "Unid Goby"               "White Catfish"           "White Crappie"          
## [37] "White Sturgeon"          "Yellowfin Goby"
#It worked!

## Fixing Steelhead Trout Name Standardization ----
# Viewed unique fish names below, thought was may need to standardize to catch repeats and maintain consistency
fish_names <- FishMaster_samenames %>%
  mutate(unique_names = paste(CommonName, ' , ', TaxonomicName)) %>%
  group_by(unique_names) %>%
  distinct(unique_names)

# Noticed in excel that Steelhead Trout and Steelhead Rainbow Trout is a missed repeat (only 4 total instances)
# Decided to standardize these instances' common names to Steelhead Trout
corrected_names <- FishMaster_samenames %>%
  mutate(CommonName =
           case_when(CommonName == "Steelhead Rainbow Trout" ~ "Steelhead Trout",
                     T ~ CommonName))

# Look at unique factors for specified columns
corrected_names %>%
  unique_factors(TMDL, Subarea, Analyte, Unit, ResultQualCode, WBT, CommonName, TissueName, SourceID)
## $TMDL
## [1] "Delta"
## 
## $Subarea
## [1] "Cache Creek Settling Basin" "Central Delta"              "Moke/Cos Rivers"           
## [4] "Sacramento River"           "San Joaquin River"          "West Delta"                
## [7] "X2"                         "YB-North"                   "YB-South"                  
## 
## $Analyte
## [1] "Mercury, Total"
## 
## $Unit
## [1] "mg/Kg dw" "mg/Kg ww"
## 
## $ResultQualCode
## [1] "="   "DNQ" "ND" 
## 
## $WBT
## [1] "Delta"        "Drain/Canal"  "Estuary"      "River/Stream" "Slough"      
## [6] "Yolo Bypass" 
## 
## $CommonName
##  [1] "American Shad"         "Bigscale Logperch"     "Black Bullhead"       
##  [4] "Black Crappie"         "Bluegill"              "Brown Bullhead"       
##  [7] "Channel Catfish"       "Chinook Salmon"        "Common Carp"          
## [10] "Crappie"               "Golden Shiner"         "Goldfish"             
## [13] "Hitch"                 "Largemouth Bass"       "Mosquitofish"         
## [16] "Prickly Sculpin"       "Red Shiner"            "Redear Sunfish"       
## [19] "Sacramento Blackfish"  "Sacramento Perch"      "Sacramento Pikeminnow"
## [22] "Sacramento Splittail"  "Sacramento Sucker"     "Shimofuri Goby"       
## [25] "Silverside"            "Smallmouth Bass"       "Splittail"            
## [28] "Spotted Bass"          "Steelhead Trout"       "Striped Bass"         
## [31] "Threadfin Shad"        "Tule Perch"            "Unid Goby"            
## [34] "White Catfish"         "White Crappie"         "White Sturgeon"       
## [37] "Yellowfin Goby"       
## 
## $TissueName
## [1] "Fillet"     "Whole Body"
## 
## $SourceID
## [1] "AppK"              "CEDENFish"         "DRMP_2016_CEDEN"   "DRMP_2017_Hg_Fish"
## [5] "DRMP_2018_Hg_Fish" "DRMP_2019_Hg_Fish" "R5MF"              "SNIP"
# Check which are NA for fish common name, should be 0 rows
fish_is_na <- corrected_names %>%
  filter(is.na(CommonName)) %>%
  select(TLAvgLength)
head(fish_is_na)
## # A tibble: 0 × 1
## # … with 1 variable: TLAvgLength <chr>
# Check to see how many rows have a fish length of 0, should be 0 rows
fish_length <- corrected_names %>%
  filter(TLAvgLength == 0)

# How many of each species have a reported length of 0?
length_zero_species <- fish_length %>% count(CommonName)

# Any sites without a StationName?
anyBlank(corrected_names, "StationName") #Great! No Blanks
## The column "StationName" does not contain any blanks.
# Any sites with missing dates?
anyBlank(corrected_names, "SampleDateTime") #Great! No Blanks
## The column "SampleDateTime" does not contain any blanks.
# Add Cache Creek Settling Basin To North Bypass ----
fish_clean <- corrected_names %>%
  mutate(Subarea = recode(Subarea, "Cache Creek Settling Basin" = "YB-North"))

#Check names one last time
fish_clean %>% unique_factors(TMDL, Subarea, Analyte, Unit, ResultQualCode, WBT, CommonName, TissueName, SourceID)
## $TMDL
## [1] "Delta"
## 
## $Subarea
## [1] "Central Delta"     "Moke/Cos Rivers"   "Sacramento River"  "San Joaquin River"
## [5] "West Delta"        "X2"                "YB-North"          "YB-South"         
## 
## $Analyte
## [1] "Mercury, Total"
## 
## $Unit
## [1] "mg/Kg dw" "mg/Kg ww"
## 
## $ResultQualCode
## [1] "="   "DNQ" "ND" 
## 
## $WBT
## [1] "Delta"        "Drain/Canal"  "Estuary"      "River/Stream" "Slough"      
## [6] "Yolo Bypass" 
## 
## $CommonName
##  [1] "American Shad"         "Bigscale Logperch"     "Black Bullhead"       
##  [4] "Black Crappie"         "Bluegill"              "Brown Bullhead"       
##  [7] "Channel Catfish"       "Chinook Salmon"        "Common Carp"          
## [10] "Crappie"               "Golden Shiner"         "Goldfish"             
## [13] "Hitch"                 "Largemouth Bass"       "Mosquitofish"         
## [16] "Prickly Sculpin"       "Red Shiner"            "Redear Sunfish"       
## [19] "Sacramento Blackfish"  "Sacramento Perch"      "Sacramento Pikeminnow"
## [22] "Sacramento Splittail"  "Sacramento Sucker"     "Shimofuri Goby"       
## [25] "Silverside"            "Smallmouth Bass"       "Splittail"            
## [28] "Spotted Bass"          "Steelhead Trout"       "Striped Bass"         
## [31] "Threadfin Shad"        "Tule Perch"            "Unid Goby"            
## [34] "White Catfish"         "White Crappie"         "White Sturgeon"       
## [37] "Yellowfin Goby"       
## 
## $TissueName
## [1] "Fillet"     "Whole Body"
## 
## $SourceID
## [1] "AppK"              "CEDENFish"         "DRMP_2016_CEDEN"   "DRMP_2017_Hg_Fish"
## [5] "DRMP_2018_Hg_Fish" "DRMP_2019_Hg_Fish" "R5MF"              "SNIP"
nrow(fish_clean)
## [1] 7719
# SAVE FishMaster after QA # ----
writexl::write_xlsx(fish_clean  %>% select(-Shape),
                    path='Reeval_Impl_Goals_Linkage_Analysis/Data/Fish/5a_FishMaster_QA.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:46:20 PST"