diff --git a/DESCRIPTION b/DESCRIPTION index b388d42..8239dc8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -4,7 +4,7 @@ Description: Suite of tools for data manipulation and calculations for Maryland DNR MBSS program. Includes functions for calculating FIBI, BIBI (MBSS genus), BIBI (MSW family), PHI, flow sums, ion contributions, and taxa distribution maps. -Version: 1.1.0.9055 +Version: 1.1.0.9056 Authors@R: c( person("Erik W.", "Leppo", email="Erik.Leppo@tetratech.com", role=c("aut","cre")), person("Ann","Roseberry Lincoln", role="ctb"), @@ -14,7 +14,7 @@ Depends: R (>= 3.4.0) License: GPL (>= 3) Encoding: UTF-8 URL: https://github.com/leppott/MBSStools -RoxygenNote: 7.1.2 +RoxygenNote: 7.3.1 Imports: dplyr, rgdal diff --git a/NEWS b/NEWS index fce34ac..3ff464a 100644 --- a/NEWS +++ b/NEWS @@ -3,216 +3,222 @@ NEWS-MBSStools - #> Last Update: 2022-01-12 09:58:19 + #> Last Update: 2024-04-05 15:56:08.393988 + +# MBSStools v1.1.0.9056 (2024-04-05) + +- fix: Revise family BIBI scoring thresholds, Issue \#45 +- test: Added test for extra digits for scoring thresholds +- refactor: Update vignette for IBI calculations, Issue \#45 + - StringAsFactors default now FALSE so don’t have to remove in + Vignette # MBSStools v1.1.0.9055 (2022-01-12) -- refactor: Update GitHub repo default branch from ‘master’ to ‘main’ +- refactor: Update GitHub repo default branch from ‘master’ to ‘main’ # MBSStools v1.1.0.9054 (2022-01-12) -- docs: Update runShiny() documentation with updated URL +- docs: Update runShiny() documentation with updated URL # MBSStools v1.1.0.9053 (2021-06-30) -- docs: Add sf to MapTaxaObs example in vignette +- docs: Add sf to MapTaxaObs example in vignette # MBSStools v1.1.0.9052 (2021-06-30) -- refactor: Modify `metric.values()` calculations to use na.rm=TRUE - - All `sum()` and `max()` metrics -- refactor: Update example in MapTaxaObs - - Swap `path.package()` for `find.package()` -- refactor: Shiny app make download button disabled when click - ‘calculate’ - - Issue #32 -- refactor: Tweak Exclude column QC in `metric.values()`, Issue #31 +- refactor: Modify `metric.values()` calculations to use na.rm=TRUE + - All `sum()` and `max()` metrics +- refactor: Update example in MapTaxaObs + - Swap `path.package()` for `find.package()` +- refactor: Shiny app make download button disabled when click + ‘calculate’ + - Issue \#32 +- refactor: Tweak Exclude column QC in `metric.values()`, Issue \#31 # MBSStools v1.1.0.9051 (2021-06-24) -- refactor: Add markdown to DESCRIPTION Suggests to avoid build - failure on GitHub Actions +- refactor: Add markdown to DESCRIPTION Suggests to avoid build failure + on GitHub Actions # MBSStools v1.1.0.9050 (2021-06-24) -- refactor: Tweak vignette so GitHub Action doesn’t fail -- refactor: Update ‘add_new’ case in `qc_taxa()` -- tests: Update testcases for qc_taxa to match recent changes +- refactor: Tweak vignette so GitHub Action doesn’t fail +- refactor: Update ‘add_new’ case in `qc_taxa()` +- tests: Update testcases for qc_taxa to match recent changes # MBSStools v1.1.0.9049 (2021-06-23) -- refactor: Add package to referenced function in MapTaxaObs -- refactor: Add global variable bindings - - MapTaxaObs - - metric.scores -- refactor: Update map example in Vignette from rgdal to sf -- refactor: Update FlowSum to convert input from tibble to data frame - - Example was failing -- refactor: Update IonContrib ion.ref default to NULL - - is.na() was causing issues when doing QC check within the - function -- fix: Fix combining of files in qc_taxa - - Change order of data frames in merge - - Convert input data frame to taxanames in all caps prior to - matching -- refactor: Shiny UI, remove semicolon for file delimiter +- refactor: Add package to referenced function in MapTaxaObs +- refactor: Add global variable bindings + - MapTaxaObs + - metric.scores +- refactor: Update map example in Vignette from rgdal to sf +- refactor: Update FlowSum to convert input from tibble to data frame + - Example was failing +- refactor: Update IonContrib ion.ref default to NULL + - is.na() was causing issues when doing QC check within the function +- fix: Fix combining of files in qc_taxa + - Change order of data frames in merge + - Convert input data frame to taxanames in all caps prior to matching +- refactor: Shiny UI, remove semicolon for file delimiter # MBSStools v1.1.0.9048 (2021-06-17) -- refactor: Update MapTaxaObs function, Issue #17 - - Issues with state shapefile and rgdal, switch to sf package -- docs: Add sf package to DESCRIPTION +- refactor: Update MapTaxaObs function, Issue \#17 + - Issues with state shapefile and rgdal, switch to sf package +- docs: Add sf package to DESCRIPTION # MBSStools v1.1.0.9047 (2021-06-17) -- refactor: Update GIS files for use with strata for consistency, - Issue #36 - - Highlands to Highland - - Piedmont to EPiedmont -- refactor: Update PHIcalc for consistency, Issue #36 - - Highlands to Highland - - Piedmont to EPiedmont - - CoastalPlain to Coastal - - BioRegion paramater to Strata - - Add QC check to use uppercase for strata -- refactor: Update MBSS.PHI data strata for consistency, Issue #36 +- refactor: Update GIS files for use with strata for consistency, Issue + \#36 + - Highlands to Highland + - Piedmont to EPiedmont +- refactor: Update PHIcalc for consistency, Issue \#36 + - Highlands to Highland + - Piedmont to EPiedmont + - CoastalPlain to Coastal + - BioRegion paramater to Strata + - Add QC check to use uppercase for strata +- refactor: Update MBSS.PHI data strata for consistency, Issue \#36 # MBSStools v1.1.0.9046 (2021-06-16) -- refactor: Add fibi and msw GIS base files to strata(), Issue #39 - - Update ProcessData script - - Add shape files to extdata\_GIS_strata.zip - - Update data.R - - Update strata function for the new layers +- refactor: Add fibi and msw GIS base files to strata(), Issue \#39 + - Update ProcessData script + - Add shape files to extdata\_GIS_strata.zip + - Update data.R + - Update strata function for the new layers # MBSStools v1.1.0.9045 (2021-06-16) -- docs: Tweak help file for strata function, Issue #39 +- docs: Tweak help file for strata function, Issue \#39 # MBSStools v1.1.0.9044 (2021-06-15) -- feat: Add strata function to assign strata based on lat-long, Issue - #39 - - Add function strata - - Add data \_GIS_strata.zip - - Add internal data shp_strata_bugs and shp_strata_fish - - Create ProcessData in data-raw for shapefiles -- style: Trim to 80 characters, NEWS -- docs: Add packages to DESCRIPTION Suggests for strata function, - Issue #39 - - sp - - MazamaSpatialUtils +- feat: Add strata function to assign strata based on lat-long, Issue + \#39 + - Add function strata + - Add data \_GIS_strata.zip + - Add internal data shp_strata_bugs and shp_strata_fish + - Create ProcessData in data-raw for shapefiles +- style: Trim to 80 characters, NEWS +- docs: Add packages to DESCRIPTION Suggests for strata function, Issue + \#39 + - sp + - MazamaSpatialUtils # MBSStools v1.1.0.9043 (2021-06-14) -- refactor: Update license file and README badge, Issue #41 +- refactor: Update license file and README badge, Issue \#41 # MBSStools v1.1.0.9042 (2021-06-14) -- refactor: Add binding for global variable, metric.scores.R -- docs: Rename example inputs to match MapTaxaObs function call, Issue - #36 - - Issue #17 -- style: Edit style of MapTaxaObs code -- refactor: Rework filepath within MapTaxaObs, Issue #17 +- refactor: Add binding for global variable, metric.scores.R +- docs: Rename example inputs to match MapTaxaObs function call, Issue + \#36 + - Issue \#17 +- style: Edit style of MapTaxaObs code +- refactor: Rework filepath within MapTaxaObs, Issue \#17 # MBSStools v1.1.0.9041 (2021-04-21) -- refactor: Edits to MBSStools_vignette.Rmd - - Move files to proper folder (vignettes) - - Fix code blocks so run properly - - Comment out write.csv() - - Convert View() to kable(head()) where eval=TRUE +- refactor: Edits to MBSStools_vignette.Rmd + - Move files to proper folder (vignettes) + - Fix code blocks so run properly + - Comment out write.csv() + - Convert View() to kable(head()) where eval=TRUE # MBSStools v1.1.0.9040 (2021-04-21) -- refactor: Edits to MBSStools_vignette.Rmd - - Merge pull request 42 +- refactor: Edits to MBSStools_vignette.Rmd + - Merge pull request 42 # MBSStools v1.1.0.9039 (2021-04-04) -- refactor: Update install code example - - README - - MBSStools_vignette.Rmd -- refactor: Update example, MapTaxaObs - - Change getwd() to tempdir() +- refactor: Update install code example + - README + - MBSStools_vignette.Rmd +- refactor: Update example, MapTaxaObs + - Change getwd() to tempdir() # MBSStools v1.1.0.9038 (2021-04-04) -- docs: Update spelling and language in MBSStools_vignette.Rmd +- docs: Update spelling and language in MBSStools_vignette.Rmd # MBSStools v1.1.0.9037 (2021-04-01) -- style: Fix items from goodpractice::gp() - - Trim lines to 80 characters - - IonContrib - - test-qc_taxa - - qc_taxa - - data - - MapTaxaObs - - server - - global - - Replace ‘=’ with ‘\<-’ - - IonContrib -- style: Fix typos +- style: Fix items from goodpractice::gp() + - Trim lines to 80 characters + - IonContrib + - test-qc_taxa + - qc_taxa + - data + - MapTaxaObs + - server + - global + - Replace ‘=’ with ‘\<-’ + - IonContrib +- style: Fix typos # MBSStools v1.1.0.9036 (2021-01-12) -- chore: Rename files in instwith non-portable names +- chore: Rename files in instwith non-portable names # MBSStools v1.1.0.9035 (2021-01-11) -- chore: Fix comment line without leading comment symbol -- chore: Document subfunctions of metric.values() -- chore: Rename files in instwith non-portable names +- chore: Fix comment line without leading comment symbol +- chore: Document subfunctions of metric.values() +- chore: Rename files in instwith non-portable names # MBSStools v1.1.0.9034 (2021-01-10) -- chore: Add bindings for global variables - - MapTaxaObs - - metric.scores - - metric.values -- style: Trim lines to 80 characters - - metric.scores - - runShiny - - PHIcalc -- chore: Remove View() from examples - - metric.scores - - metric.values - - PHIcalc - - IonContrib - - FlowSum +- chore: Add bindings for global variables + - MapTaxaObs + - metric.scores + - metric.values +- style: Trim lines to 80 characters + - metric.scores + - runShiny + - PHIcalc +- chore: Remove View() from examples + - metric.scores + - metric.values + - PHIcalc + - IonContrib + - FlowSum # MBSStools v1.1.0.9033 (2021-01-10) -- chore: Remove Excel files from data folder - - AllFish_95to16.xls - - TaxaMapsCrossWalk20170731.xlsx -- style: Trim to 80 character lines - - FlowSum.R -- chore: Remove orphaned package from DESCRIPTION - - plotly in Suggests -- chore: Add non standard files to .Rbuildignore - - NEWS.rmd - - README.Rmd -- chore: Change default for ion.ref parameter in IonContrib to NA - - Use MBSS.Ion.Ref if NA +- chore: Remove Excel files from data folder + - AllFish_95to16.xls + - TaxaMapsCrossWalk20170731.xlsx +- style: Trim to 80 character lines + - FlowSum.R +- chore: Remove orphaned package from DESCRIPTION + - plotly in Suggests +- chore: Add non standard files to .Rbuildignore + - NEWS.rmd + - README.Rmd +- chore: Change default for ion.ref parameter in IonContrib to NA + - Use MBSS.Ion.Ref if NA # MBSStools v1.1.0.9032 (2020-12-27) -- docs: DESCRIPTION, add Bug Reports entry -- tests: qc_taxa, replace = with \<- -- refactor: Add foo:: to missing functions. +- docs: DESCRIPTION, add Bug Reports entry +- tests: qc_taxa, replace = with \<- +- refactor: Add foo:: to missing functions. # MBSStools v1.1.0.9031 (2020-12-24) -- docs: Readme, add codecov badge -- docs: Readme, add gh R-CMD-check badge -- docs: Readme, sort badges +- docs: Readme, add codecov badge +- docs: Readme, add gh R-CMD-check badge +- docs: Readme, sort badges # MBSStools v1.1.0.9030 (2020-12-24) -- docs: Add test-coverage gh Action, codecov.io +- docs: Add test-coverage gh Action, codecov.io # MBSStools v1.1.0.9029 (2020-12-24) @@ -220,453 +226,452 @@ refactor: CodeFactor change 1:foo() to seq_len(foo()) + MapTaxaObs.R # MBSStools v1.1.0.9028 (2020-12-24) -- docs: Remove docs folder for pkgdown in main branch - - pkgdown now handled by GitHub Action and is stored in the - gh-pages branch +- docs: Remove docs folder for pkgdown in main branch + - pkgdown now handled by GitHub Action and is stored in the gh-pages + branch # MBSStools v1.1.0.9027 (2020-12-24) -- docs: Add pkgdown github action -- ci: Remove travis.yml (free service shutting down) +- docs: Add pkgdown github action +- ci: Remove travis.yml (free service shutting down) # MBSStools v1.1.0.9026 (2020-12-23) -- docs: ReadMe, add lifecycle badge +- docs: ReadMe, add lifecycle badge # MBSStools v1.1.0.9025 (2020-12-23) -- docs: ReadMe, not all changes updated from previous update +- docs: ReadMe, not all changes updated from previous update # MBSStools v1.1.0.9024 (2020-12-23) -- docs: ReadMe, add CodeFactor badge +- docs: ReadMe, add CodeFactor badge -- docs: ReadMe, Remove TravisCI badge as service is shutting down free - accounts +- docs: ReadMe, Remove TravisCI badge as service is shutting down free + accounts -- ci: Remove TravisCI yaml and switch to GitHub Actions CI +- ci: Remove TravisCI yaml and switch to GitHub Actions CI # MBSStools v1.1.0.9023 (2020-07-09) -- Rebuild vignette with taxa distribution map as image; Issue #33 +- Rebuild vignette with taxa distribution map as image; Issue \#33 # MBSStools v1.1.0.9022 (2020-07-09) -- Shiny app, ensure download button is not active until create zip - file; Issue #32 +- Shiny app, ensure download button is not active until create zip file; + Issue \#32 - - Add shinyjs to DESCRIPTION + - Add shinyjs to DESCRIPTION # MBSStools v1.1.0.9021 (2020-07-09) -- metric.values; Issue #30 and #31 +- metric.values; Issue \#30 and \#31 - - Modify Exclude column QC check. + - Modify Exclude column QC check. # MBSStools v1.1.0.9020 (2020-07-09) -- metric.values; Issue #34 +- metric.values; Issue \#34 - - Added Piercer as valid FFG entry. + - Added Piercer as valid FFG entry. -- UI.R +- UI.R - - Added version number to title of Shiny app. + - Added version number to title of Shiny app. # MBSStools v1.1.0.9019 (2020-07-02) -- metric.values; Issue #30 - - Add basic QC fixes for non-standard bug files. +- metric.values; Issue \#30 + - Add basic QC fixes for non-standard bug files. # MBSStools v1.1.0.9018 (2020-07-02) -- qc_taxa - - Fix typo in example. +- qc_taxa + - Fix typo in example. # MBSStools v1.1.0.9017 (2020-07-01) -- metric.scores; Issue #29 - - Fish message about 0 individuals always showing. - - Added condition so prints only if relevant. +- metric.scores; Issue \#29 + - Fish message about 0 individuals always showing. + - Added condition so prints only if relevant. # MBSStools v1.1.0.9016 (2020-07-01) -- Update taxa_fish data without an extra column. +- Update taxa_fish data without an extra column. # MBSStools v1.1.0.9015 (2020-06-30) -- Remove SiteID from \_95to16.xls. -- Replace example data files in shiny app (munged Site IDs). -- Update Vignette. +- Remove SiteID from \_95to16.xls. +- Replace example data files in shiny app (munged Site IDs). +- Update Vignette. # MBSStools v1.1.0.9014 (2020-06-30) -- Modify Site IDs in bug (genus and family) and fish data. -- Update Vignette. +- Modify Site IDs in bug (genus and family) and fish data. +- Update Vignette. # MBSStools v1.1.0.9013 (2020-06-26) -- Vignette not rebuilding. - - Replace XLConnect with readxl. - - Java issue. +- Vignette not rebuilding. + - Replace XLConnect with readxl. + - Java issue. # MBSStools v1.1.0.9012 (2020-06-23) -- Update Shiny app to use qc_taxa(); Issue #26 +- Update Shiny app to use qc_taxa(); Issue \#26 # MBSStools v1.1.0.9011 (2020-06-23) -- Update pkgdown website. +- Update pkgdown website. # MBSStools v1.1.0.9010 (2020-06-23) -- metric.values - - QC checks on valid values; Issue #26 +- metric.values + - QC checks on valid values; Issue \#26 # MBSStools v1.1.0.9009 (2020-06-23) -- qc_taxa - - New function; Issue #13 and #26 -- tests - - Add tests for qc_taxa +- qc_taxa + - New function; Issue \#13 and \#26 +- tests + - Add tests for qc_taxa # MBSStools v1.1.0.9008 (2020-05-22) -- taxa_fish - - Update 2 Species name errors so passes QC check. +- taxa_fish + - Update 2 Species name errors so passes QC check. # MBSStools v1.1.0.9007 (2020-05-21) -- Add testing - - DESCRIPTION, add testthat to Suggests - - test PHIcalc, Issue #19 +- Add testing + - DESCRIPTION, add testthat to Suggests + - test PHIcalc, Issue \#19 # MBSStools v1.1.0.9006 (2020-05-20) -- metric.scores.R, Issue #20 - - Update column name checking for user input data frame. - - Edit error message to user. +- metric.scores.R, Issue \#20 + - Update column name checking for user input data frame. + - Edit error message to user. # MBSStools v1.1.0.9005 (2020-05-20) -- metric.scores.R - - Fix error in assigning final IBI due to changes in behavior of - Tibbles. +- metric.scores.R + - Fix error in assigning final IBI due to changes in behavior of + Tibbles. # MBSStools v1.1.0.9004 (2020-05-20) -- Shiny App, Issue #22. - - File upload size increased from 10 to 25 MB. - - Output file format, tsv to csv. - - Zip file download. - - Remove input file (original and transformed). - - Keep only the “results\_” files (values, scores, and plot). +- Shiny App, Issue \#22. + - File upload size increased from 10 to 25 MB. + - Output file format, tsv to csv. + - Zip file download. + - Remove input file (original and transformed). + - Keep only the “results\_” files (values, scores, and plot). # MBSStools v1.1.0.9003 (2020-05-20) -- Update fish metric scoring for no taxa obsevered, Issue #26 - - taxa_fish.rda - - data.r - - metric.scores.r +- Update fish metric scoring for no taxa obsevered, Issue \#26 + - taxa_fish.rda + - data.r + - metric.scores.r # MBSStools v1.1.0.9002 (2020-05-18) -- Update metric.values. - - Error when using R v4.0. Issue #28. +- Update metric.values. + - Error when using R v4.0. Issue \#28. # MBSStools v1.1.0.9001 (2019-06-13) -- Add pkgdown website. - - Examples failed for FlowSum and IonContrib. +- Add pkgdown website. + - Examples failed for FlowSum and IonContrib. # MBSStools v1.1 (2019-06-13) -- Shiny release version +- Shiny release version # MBSStools v1.0.2.9015 (2019-06-13) -- Shiny app, Issue #22 - - Remove link to package vignette (doesn’t work on Shiny.io) +- Shiny app, Issue \#22 + - Remove link to package vignette (doesn’t work on Shiny.io) # MBSStools v1.0.2.9014 (2019-06-13) -- Additional packages to Suggests for the Shiny app, Issue #22 +- Additional packages to Suggests for the Shiny app, Issue \#22 # MBSStools v1.0.2.9013 (2019-06-13) -- Complete Shiny app, Issue #22 +- Complete Shiny app, Issue \#22 # MBSStools v1.0.2.9012 (2019-05-17) -- README - - Update install example to ensure vignettes are installed. +- README + - Update install example to ensure vignettes are installed. # MBSStools v1.0.2.9011 (2019-05-17) -- Update for R v3.6.0, Issue #27 - - README - - Added extra line to make work devtools::install_github() - - DESCRIPTION - - Remove StagedInstall: no -- README - - Update badges. +- Update for R v3.6.0, Issue \#27 + - README + - Added extra line to make work devtools::install_github() + - DESCRIPTION + - Remove StagedInstall: no +- README + - Update badges. # MBSStools v1.0.2.9010 (2019-05-01) -- Shiny app development, Issue #22 - - Not complete. +- Shiny app development, Issue \#22 + - Not complete. # MBSStools v1.0.2.9010 (2019-05-01) -- Revise for staged install for R v3.6.0, Issue #27 - - DESCRIPTION - - StagedInstall: no - - Temporary fix. Still needs to be installed from a local file. -- Edits to Shiny App. Issue #22. - - Incomplete. +- Revise for staged install for R v3.6.0, Issue \#27 + - DESCRIPTION + - StagedInstall: no + - Temporary fix. Still needs to be installed from a local file. +- Edits to Shiny App. Issue \#22. + - Incomplete. # MBSStools v1.0.2.9009 (2019-05-01) -- Revise “EXCLUDE” column in benthic data from “Y” and “” to TRUE and - FALSE. - Issue #25. - - data - - taxa_bugs_family - - taxa_bugs_genus, ProcessData had additional issues that - weren’t present in prior versions. - - function; metric.values - - Function help text - - Example use “MetricName.Other” rather than “Metric” to get - pertinent metrics. - - Replace EXCLUDE!=“Y” with EXCLUDE!=TRUE -- Vignette - - Example for installing a package (line 51) had a typo. - - droplevels update for MetricName.Other (line 110, 161, and 187). - - Shiny example code, eval=FALSE +- Revise “EXCLUDE” column in benthic data from “Y” and “” to TRUE and + FALSE. + Issue \#25. + - data + - taxa_bugs_family + - taxa_bugs_genus, ProcessData had additional issues that weren’t + present in prior versions. + - function; metric.values + - Function help text + - Example use “MetricName.Other” rather than “Metric” to get + pertinent metrics. + - Replace EXCLUDE!=“Y” with EXCLUDE!=TRUE +- Vignette + - Example for installing a package (line 51) had a typo. + - droplevels update for MetricName.Other (line 110, 161, and 187). + - Shiny example code, eval=FALSE # MBSStools v1.0.2.9008 (2019-02-21) -- Revised scoring thresholds table, per MBSS. Issue #23. -- metric.scores.R - - Update example code to match the MBSS metric names. - - Slight tweaking of QC check for column names. +- Revised scoring thresholds table, per MBSS. Issue \#23. +- metric.scores.R + - Update example code to match the MBSS metric names. + - Slight tweaking of QC check for column names. # MBSStools v1.0.2.9007 (2019-02-12) -- Shiny app, Issue #22 -- Include function to launch the Shiny app. - - runShiny - - Add to Vignette. +- Shiny app, Issue \#22 +- Include function to launch the Shiny app. + - runShiny + - Add to Vignette. # MBSStools v1.0.2.9006 (2017-07-31) -- metric.scores - - Add example of adding narrative to IBI scores. Issue #21. +- metric.scores + - Add example of adding narrative to IBI scores. Issue \#21. # MBSStools v1.0.2.9005 (2017-07-31) -- DESCRIPTION - - Suggests; XLConnect (MBSStools_vignette.Rmd) - - Maintainer; (Needed if submit to - CRAN) - - Description; make more verbose. (Needed if submit to CRAN) - - Title; remove ending period. -- NEWS - - Restructure. Still not right but has all info now. - - Remove planned updates. -- Shorten long lines. - - FlowSum.R - - IonContrib.R - - MapTaxaObs.R - - metric.scores.R - - metric.values.R - - PHIcalc.R -- Remove “keywords” (incorrect usage). - - FlowSum.R - - IonContrib.R - - MapTaxaObs.R - - metric.scores.R - - metric.values.R - - PHIcalc.R +- DESCRIPTION + - Suggests; XLConnect (MBSStools_vignette.Rmd) + - Maintainer; (Needed if submit to CRAN) + - Description; make more verbose. (Needed if submit to CRAN) + - Title; remove ending period. +- NEWS + - Restructure. Still not right but has all info now. + - Remove planned updates. +- Shorten long lines. + - FlowSum.R + - IonContrib.R + - MapTaxaObs.R + - metric.scores.R + - metric.values.R + - PHIcalc.R +- Remove “keywords” (incorrect usage). + - FlowSum.R + - IonContrib.R + - MapTaxaObs.R + - metric.scores.R + - metric.values.R + - PHIcalc.R # MBSStools v1.0.2.9004 (2017-07-31) -- .travis.yml - - Add TravisCI yml to GitHub directory. - - Add TravisCI yml to Rbuildignore. +- .travis.yml + - Add TravisCI yml to GitHub directory. + - Add TravisCI yml to Rbuildignore. # MBSStools v1.0.2.9003 (2017-07-30) -- Add continuous integration (TravisCI) badge to ReadMe. +- Add continuous integration (TravisCI) badge to ReadMe. # MBSStools v1.0.2.9002 (2017-07-25) -- DESCRIPTION -- Move dplyr and rgdal from Suggests to Imports - - Packages not always loading. Issue #15 and Issue #17 -- Modify minimum version of R from 3.3.2 to 3.4.0. - - MapTaxaObs did not work in earlier version of R. - Updated to v3.4.0 and no issue. Issue #17. +- DESCRIPTION +- Move dplyr and rgdal from Suggests to Imports + - Packages not always loading. Issue \#15 and Issue \#17 +- Modify minimum version of R from 3.3.2 to 3.4.0. + - MapTaxaObs did not work in earlier version of R. + Updated to v3.4.0 and no issue. Issue \#17. # MBSStools v1.0.2.9001 (2017-05-11) -- Issue #17 with MapTaxaObs -- Removed extra file in vignette folder. -- Update Vignette as doesn’t build in check; commented out MapTaxaObs. +- Issue \#17 with MapTaxaObs +- Removed extra file in vignette folder. +- Update Vignette as doesn’t build in check; commented out MapTaxaObs. # MBSStools v1.0.2.0000 (2017-10-26) -- Corrected metric.score() \[line 181\] for fish for “HIGHLANDS” was - incorrectly designated. These sites were not getting a final FIBI - score. +- Corrected metric.score() \[line 181\] for fish for “HIGHLANDS” was + incorrectly designated. These sites were not getting a final FIBI + score. # MBSStools v1.0.1.0000 (2017-09-26) -- Update each function’s description and vignette with the packages - needed for that function to work properly. +- Update each function’s description and vignette with the packages + needed for that function to work properly. -- Update Vignette for a few typos and so shows in final package. Also - messages=FALSE for XLConnect example. +- Update Vignette for a few typos and so shows in final package. Also + messages=FALSE for XLConnect example. -- DESCRIPTION. Move rgdal from Depends to Suggests. +- DESCRIPTION. Move rgdal from Depends to Suggests. -- Fish metric example not working in metric.values(). Issue #14. - Extra parameter. Removed and works. +- Fish metric example not working in metric.values(). Issue \#14. + Extra parameter. Removed and works. # MBSStools v1.0.0.0000 (2017-09-24) -- Release version 1. +- Release version 1. # MBSStools v0.0.0.9018 (2017-09-24) -- Add install guide notebook. +- Add install guide notebook. -- Tweak vignette. +- Tweak vignette. -- Update Readme. +- Update Readme. -- Final version before going to v1.0.0. +- Final version before going to v1.0.0. -- IonContrib, ensure data input is a data frame. +- IonContrib, ensure data input is a data frame. -- PHI, ensure data input is a data frame. +- PHI, ensure data input is a data frame. # MBSStools v0.0.0.9017 (2017-09-20) -- Update vignette. +- Update vignette. -- Fixed example for fish metrics in metric.values(). 20170920. +- Fixed example for fish metrics in metric.values(). 20170920. # MBSStools v0.0.0.9016 (2017-09-19) -- IonContrib() added barplot example. 20170919. +- IonContrib() added barplot example. 20170919. # MBSStools v0.0.0.9015 (2017-09-13) -- Fix typo in example for metric.scores(); “Metrics.Bugs.Scores” to - “Metrics.Bugs.Scores.MBSS”. 20170913. +- Fix typo in example for metric.scores(); “Metrics.Bugs.Scores” to + “Metrics.Bugs.Scores.MBSS”. 20170913. # MBSStools v0.0.0.9014 (2017-09-09) -- Added MSW (family) data, values, and scores. 20170909. +- Added MSW (family) data, values, and scores. 20170909. # MBSStools v0.0.0.9013 (2017-09-09) -- Added BIBI. -- Updated metric names to match those used by MBSS. -- Updated metric.values() and metric.scores(). -- Updated genus level bug data file. +- Added BIBI. +- Updated metric names to match those used by MBSS. +- Updated metric.values() and metric.scores(). +- Updated genus level bug data file. # MBSStools v0.0.0.9012 (2017-09-08) -- Add FIBI. 2017-09-05. -- metric.values.R -- metric.score.R -- example data files -- -raw.scoring.tab and metric adjustment -- Added dplyr to DESCRIPTION. Needed for metric values and scores. - 20170908 -- Modified -raw.scoring.tab to resolve QC issues with 2016 - data. 20170908. +- Add FIBI. 2017-09-05. +- metric.values.R +- metric.score.R +- example data files +- -raw.scoring.tab and metric adjustment +- Added dplyr to DESCRIPTION. Needed for metric values and scores. + 20170908 +- Modified -raw.scoring.tab to resolve QC issues with 2016 data. + 20170908. # MBSStools 0.0.0.9011 (2017-08-22) -- Updated taxa map data for typo in “no fish observed”. 20170822. +- Updated taxa map data for typo in “no fish observed”. 20170822. # MBSStools v0.0.0.9010 (2017-07-31) -- Updated fish data and crosswalk table examples so have more matched - data. - Also update help to remind that data has to be on the first - worksheet for the Excel file. 20170731. +- Updated fish data and crosswalk table examples so have more matched + data. + Also update help to remind that data has to be on the first worksheet + for the Excel file. 20170731. # MBSStools v0.0.0.9009 (2017-07-28) -- Updated DESCRIPTION. “Erik” to “Erik W.” and added Matt Ashton as - data contributor. 20170728. +- Updated DESCRIPTION. “Erik” to “Erik W.” and added Matt Ashton as data + contributor. 20170728. # MBSStools v0.0.0.9008 (2017-07-21) -- Added TaxaMapsObs(). Issue #2. 20170720. +- Added TaxaMapsObs(). Issue \#2. 20170720. -- Libraries readxl (suggested) and rgdal (required) added to - DESCRIPTION. - Maps won’t generate without rgdal loaded. 20170720. +- Libraries readxl (suggested) and rgdal (required) added to + DESCRIPTION. + Maps won’t generate without rgdal loaded. 20170720. -- Added example data and GIS files (zipped). 20170721. +- Added example data and GIS files (zipped). 20170721. # MBSStools v0.0.0.9007 (2017-06-23) -- Added “LazyData: true” to DESCRIPTION. Data was not being loaded - properly. - Issue #9. 20170623. +- Added “LazyData: true” to DESCRIPTION. Data was not being loaded + properly. + Issue \#9. 20170623. # MBSStools v0.0.0.9006 (2017-06-23) -- Modified vignette. +- Modified vignette. -- Modified data-raw Process data R files (wd). +- Modified data-raw Process data R files (wd). -- Added IonContrib.R +- Added IonContrib.R # MBSStools v0.0.0.9005 (2017-06-14) -- Added vignette for documentation of each function and the library as - a whole. +- Added vignette for documentation of each function and the library as a + whole. # MBSStools v0.0.0.9004 (2017-04-28) -- Address issues with PHIcalc from testing. Removed extra rows from - Excel import for data MBSS.PHI. Added line to convert values to - numeric inside MBSS.PHI. (not complete) +- Address issues with PHIcalc from testing. Removed extra rows from + Excel import for data MBSS.PHI. Added line to convert values to + numeric inside MBSS.PHI. (not complete) # MBSStools v0.0.0.9003 (2017-04-21) -- FlowSum(). Added Error Handling for misidentified Channels. - Updated data MBSS.flow. +- FlowSum(). Added Error Handling for misidentified Channels. + Updated data MBSS.flow. # MBSStools v0.0.0.9002 (2017-04-20) -- Flow sum calculation completed. Included Channel Number as grouping - variable but sum across channels to get the total site flow. +- Flow sum calculation completed. Included Channel Number as grouping + variable but sum across channels to get the total site flow. -- PHI, edit script for outlining in RStudio. +- PHI, edit script for outlining in RStudio. -- PHI.calc() to PHIcalc(). +- PHI.calc() to PHIcalc(). -- Data.R and folder “data-raw”. +- Data.R and folder “data-raw”. -- PHI, tweak for created data. Using Excel to build rda rather than - txt file from the Excel. +- PHI, tweak for created data. Using Excel to build rda rather than txt + file from the Excel. # MBSStools v0.0.0.9001 (2017-03-29) -- Completed PHI calculation. +- Completed PHI calculation. # MBSStools v0.0.0.9000 (2017-03-27) -- Created GitHub repository. +- Created GitHub repository. -- Added ReadME.RMD and NEWS.RMD +- Added ReadME.RMD and NEWS.RMD -- PHI calculation started. +- PHI calculation started. diff --git a/NEWS.md b/NEWS.md index fce34ac..3ff464a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,216 +3,222 @@ NEWS-MBSStools - #> Last Update: 2022-01-12 09:58:19 + #> Last Update: 2024-04-05 15:56:08.393988 + +# MBSStools v1.1.0.9056 (2024-04-05) + +- fix: Revise family BIBI scoring thresholds, Issue \#45 +- test: Added test for extra digits for scoring thresholds +- refactor: Update vignette for IBI calculations, Issue \#45 + - StringAsFactors default now FALSE so don’t have to remove in + Vignette # MBSStools v1.1.0.9055 (2022-01-12) -- refactor: Update GitHub repo default branch from ‘master’ to ‘main’ +- refactor: Update GitHub repo default branch from ‘master’ to ‘main’ # MBSStools v1.1.0.9054 (2022-01-12) -- docs: Update runShiny() documentation with updated URL +- docs: Update runShiny() documentation with updated URL # MBSStools v1.1.0.9053 (2021-06-30) -- docs: Add sf to MapTaxaObs example in vignette +- docs: Add sf to MapTaxaObs example in vignette # MBSStools v1.1.0.9052 (2021-06-30) -- refactor: Modify `metric.values()` calculations to use na.rm=TRUE - - All `sum()` and `max()` metrics -- refactor: Update example in MapTaxaObs - - Swap `path.package()` for `find.package()` -- refactor: Shiny app make download button disabled when click - ‘calculate’ - - Issue #32 -- refactor: Tweak Exclude column QC in `metric.values()`, Issue #31 +- refactor: Modify `metric.values()` calculations to use na.rm=TRUE + - All `sum()` and `max()` metrics +- refactor: Update example in MapTaxaObs + - Swap `path.package()` for `find.package()` +- refactor: Shiny app make download button disabled when click + ‘calculate’ + - Issue \#32 +- refactor: Tweak Exclude column QC in `metric.values()`, Issue \#31 # MBSStools v1.1.0.9051 (2021-06-24) -- refactor: Add markdown to DESCRIPTION Suggests to avoid build - failure on GitHub Actions +- refactor: Add markdown to DESCRIPTION Suggests to avoid build failure + on GitHub Actions # MBSStools v1.1.0.9050 (2021-06-24) -- refactor: Tweak vignette so GitHub Action doesn’t fail -- refactor: Update ‘add_new’ case in `qc_taxa()` -- tests: Update testcases for qc_taxa to match recent changes +- refactor: Tweak vignette so GitHub Action doesn’t fail +- refactor: Update ‘add_new’ case in `qc_taxa()` +- tests: Update testcases for qc_taxa to match recent changes # MBSStools v1.1.0.9049 (2021-06-23) -- refactor: Add package to referenced function in MapTaxaObs -- refactor: Add global variable bindings - - MapTaxaObs - - metric.scores -- refactor: Update map example in Vignette from rgdal to sf -- refactor: Update FlowSum to convert input from tibble to data frame - - Example was failing -- refactor: Update IonContrib ion.ref default to NULL - - is.na() was causing issues when doing QC check within the - function -- fix: Fix combining of files in qc_taxa - - Change order of data frames in merge - - Convert input data frame to taxanames in all caps prior to - matching -- refactor: Shiny UI, remove semicolon for file delimiter +- refactor: Add package to referenced function in MapTaxaObs +- refactor: Add global variable bindings + - MapTaxaObs + - metric.scores +- refactor: Update map example in Vignette from rgdal to sf +- refactor: Update FlowSum to convert input from tibble to data frame + - Example was failing +- refactor: Update IonContrib ion.ref default to NULL + - is.na() was causing issues when doing QC check within the function +- fix: Fix combining of files in qc_taxa + - Change order of data frames in merge + - Convert input data frame to taxanames in all caps prior to matching +- refactor: Shiny UI, remove semicolon for file delimiter # MBSStools v1.1.0.9048 (2021-06-17) -- refactor: Update MapTaxaObs function, Issue #17 - - Issues with state shapefile and rgdal, switch to sf package -- docs: Add sf package to DESCRIPTION +- refactor: Update MapTaxaObs function, Issue \#17 + - Issues with state shapefile and rgdal, switch to sf package +- docs: Add sf package to DESCRIPTION # MBSStools v1.1.0.9047 (2021-06-17) -- refactor: Update GIS files for use with strata for consistency, - Issue #36 - - Highlands to Highland - - Piedmont to EPiedmont -- refactor: Update PHIcalc for consistency, Issue #36 - - Highlands to Highland - - Piedmont to EPiedmont - - CoastalPlain to Coastal - - BioRegion paramater to Strata - - Add QC check to use uppercase for strata -- refactor: Update MBSS.PHI data strata for consistency, Issue #36 +- refactor: Update GIS files for use with strata for consistency, Issue + \#36 + - Highlands to Highland + - Piedmont to EPiedmont +- refactor: Update PHIcalc for consistency, Issue \#36 + - Highlands to Highland + - Piedmont to EPiedmont + - CoastalPlain to Coastal + - BioRegion paramater to Strata + - Add QC check to use uppercase for strata +- refactor: Update MBSS.PHI data strata for consistency, Issue \#36 # MBSStools v1.1.0.9046 (2021-06-16) -- refactor: Add fibi and msw GIS base files to strata(), Issue #39 - - Update ProcessData script - - Add shape files to extdata\_GIS_strata.zip - - Update data.R - - Update strata function for the new layers +- refactor: Add fibi and msw GIS base files to strata(), Issue \#39 + - Update ProcessData script + - Add shape files to extdata\_GIS_strata.zip + - Update data.R + - Update strata function for the new layers # MBSStools v1.1.0.9045 (2021-06-16) -- docs: Tweak help file for strata function, Issue #39 +- docs: Tweak help file for strata function, Issue \#39 # MBSStools v1.1.0.9044 (2021-06-15) -- feat: Add strata function to assign strata based on lat-long, Issue - #39 - - Add function strata - - Add data \_GIS_strata.zip - - Add internal data shp_strata_bugs and shp_strata_fish - - Create ProcessData in data-raw for shapefiles -- style: Trim to 80 characters, NEWS -- docs: Add packages to DESCRIPTION Suggests for strata function, - Issue #39 - - sp - - MazamaSpatialUtils +- feat: Add strata function to assign strata based on lat-long, Issue + \#39 + - Add function strata + - Add data \_GIS_strata.zip + - Add internal data shp_strata_bugs and shp_strata_fish + - Create ProcessData in data-raw for shapefiles +- style: Trim to 80 characters, NEWS +- docs: Add packages to DESCRIPTION Suggests for strata function, Issue + \#39 + - sp + - MazamaSpatialUtils # MBSStools v1.1.0.9043 (2021-06-14) -- refactor: Update license file and README badge, Issue #41 +- refactor: Update license file and README badge, Issue \#41 # MBSStools v1.1.0.9042 (2021-06-14) -- refactor: Add binding for global variable, metric.scores.R -- docs: Rename example inputs to match MapTaxaObs function call, Issue - #36 - - Issue #17 -- style: Edit style of MapTaxaObs code -- refactor: Rework filepath within MapTaxaObs, Issue #17 +- refactor: Add binding for global variable, metric.scores.R +- docs: Rename example inputs to match MapTaxaObs function call, Issue + \#36 + - Issue \#17 +- style: Edit style of MapTaxaObs code +- refactor: Rework filepath within MapTaxaObs, Issue \#17 # MBSStools v1.1.0.9041 (2021-04-21) -- refactor: Edits to MBSStools_vignette.Rmd - - Move files to proper folder (vignettes) - - Fix code blocks so run properly - - Comment out write.csv() - - Convert View() to kable(head()) where eval=TRUE +- refactor: Edits to MBSStools_vignette.Rmd + - Move files to proper folder (vignettes) + - Fix code blocks so run properly + - Comment out write.csv() + - Convert View() to kable(head()) where eval=TRUE # MBSStools v1.1.0.9040 (2021-04-21) -- refactor: Edits to MBSStools_vignette.Rmd - - Merge pull request 42 +- refactor: Edits to MBSStools_vignette.Rmd + - Merge pull request 42 # MBSStools v1.1.0.9039 (2021-04-04) -- refactor: Update install code example - - README - - MBSStools_vignette.Rmd -- refactor: Update example, MapTaxaObs - - Change getwd() to tempdir() +- refactor: Update install code example + - README + - MBSStools_vignette.Rmd +- refactor: Update example, MapTaxaObs + - Change getwd() to tempdir() # MBSStools v1.1.0.9038 (2021-04-04) -- docs: Update spelling and language in MBSStools_vignette.Rmd +- docs: Update spelling and language in MBSStools_vignette.Rmd # MBSStools v1.1.0.9037 (2021-04-01) -- style: Fix items from goodpractice::gp() - - Trim lines to 80 characters - - IonContrib - - test-qc_taxa - - qc_taxa - - data - - MapTaxaObs - - server - - global - - Replace ‘=’ with ‘\<-’ - - IonContrib -- style: Fix typos +- style: Fix items from goodpractice::gp() + - Trim lines to 80 characters + - IonContrib + - test-qc_taxa + - qc_taxa + - data + - MapTaxaObs + - server + - global + - Replace ‘=’ with ‘\<-’ + - IonContrib +- style: Fix typos # MBSStools v1.1.0.9036 (2021-01-12) -- chore: Rename files in instwith non-portable names +- chore: Rename files in instwith non-portable names # MBSStools v1.1.0.9035 (2021-01-11) -- chore: Fix comment line without leading comment symbol -- chore: Document subfunctions of metric.values() -- chore: Rename files in instwith non-portable names +- chore: Fix comment line without leading comment symbol +- chore: Document subfunctions of metric.values() +- chore: Rename files in instwith non-portable names # MBSStools v1.1.0.9034 (2021-01-10) -- chore: Add bindings for global variables - - MapTaxaObs - - metric.scores - - metric.values -- style: Trim lines to 80 characters - - metric.scores - - runShiny - - PHIcalc -- chore: Remove View() from examples - - metric.scores - - metric.values - - PHIcalc - - IonContrib - - FlowSum +- chore: Add bindings for global variables + - MapTaxaObs + - metric.scores + - metric.values +- style: Trim lines to 80 characters + - metric.scores + - runShiny + - PHIcalc +- chore: Remove View() from examples + - metric.scores + - metric.values + - PHIcalc + - IonContrib + - FlowSum # MBSStools v1.1.0.9033 (2021-01-10) -- chore: Remove Excel files from data folder - - AllFish_95to16.xls - - TaxaMapsCrossWalk20170731.xlsx -- style: Trim to 80 character lines - - FlowSum.R -- chore: Remove orphaned package from DESCRIPTION - - plotly in Suggests -- chore: Add non standard files to .Rbuildignore - - NEWS.rmd - - README.Rmd -- chore: Change default for ion.ref parameter in IonContrib to NA - - Use MBSS.Ion.Ref if NA +- chore: Remove Excel files from data folder + - AllFish_95to16.xls + - TaxaMapsCrossWalk20170731.xlsx +- style: Trim to 80 character lines + - FlowSum.R +- chore: Remove orphaned package from DESCRIPTION + - plotly in Suggests +- chore: Add non standard files to .Rbuildignore + - NEWS.rmd + - README.Rmd +- chore: Change default for ion.ref parameter in IonContrib to NA + - Use MBSS.Ion.Ref if NA # MBSStools v1.1.0.9032 (2020-12-27) -- docs: DESCRIPTION, add Bug Reports entry -- tests: qc_taxa, replace = with \<- -- refactor: Add foo:: to missing functions. +- docs: DESCRIPTION, add Bug Reports entry +- tests: qc_taxa, replace = with \<- +- refactor: Add foo:: to missing functions. # MBSStools v1.1.0.9031 (2020-12-24) -- docs: Readme, add codecov badge -- docs: Readme, add gh R-CMD-check badge -- docs: Readme, sort badges +- docs: Readme, add codecov badge +- docs: Readme, add gh R-CMD-check badge +- docs: Readme, sort badges # MBSStools v1.1.0.9030 (2020-12-24) -- docs: Add test-coverage gh Action, codecov.io +- docs: Add test-coverage gh Action, codecov.io # MBSStools v1.1.0.9029 (2020-12-24) @@ -220,453 +226,452 @@ refactor: CodeFactor change 1:foo() to seq_len(foo()) + MapTaxaObs.R # MBSStools v1.1.0.9028 (2020-12-24) -- docs: Remove docs folder for pkgdown in main branch - - pkgdown now handled by GitHub Action and is stored in the - gh-pages branch +- docs: Remove docs folder for pkgdown in main branch + - pkgdown now handled by GitHub Action and is stored in the gh-pages + branch # MBSStools v1.1.0.9027 (2020-12-24) -- docs: Add pkgdown github action -- ci: Remove travis.yml (free service shutting down) +- docs: Add pkgdown github action +- ci: Remove travis.yml (free service shutting down) # MBSStools v1.1.0.9026 (2020-12-23) -- docs: ReadMe, add lifecycle badge +- docs: ReadMe, add lifecycle badge # MBSStools v1.1.0.9025 (2020-12-23) -- docs: ReadMe, not all changes updated from previous update +- docs: ReadMe, not all changes updated from previous update # MBSStools v1.1.0.9024 (2020-12-23) -- docs: ReadMe, add CodeFactor badge +- docs: ReadMe, add CodeFactor badge -- docs: ReadMe, Remove TravisCI badge as service is shutting down free - accounts +- docs: ReadMe, Remove TravisCI badge as service is shutting down free + accounts -- ci: Remove TravisCI yaml and switch to GitHub Actions CI +- ci: Remove TravisCI yaml and switch to GitHub Actions CI # MBSStools v1.1.0.9023 (2020-07-09) -- Rebuild vignette with taxa distribution map as image; Issue #33 +- Rebuild vignette with taxa distribution map as image; Issue \#33 # MBSStools v1.1.0.9022 (2020-07-09) -- Shiny app, ensure download button is not active until create zip - file; Issue #32 +- Shiny app, ensure download button is not active until create zip file; + Issue \#32 - - Add shinyjs to DESCRIPTION + - Add shinyjs to DESCRIPTION # MBSStools v1.1.0.9021 (2020-07-09) -- metric.values; Issue #30 and #31 +- metric.values; Issue \#30 and \#31 - - Modify Exclude column QC check. + - Modify Exclude column QC check. # MBSStools v1.1.0.9020 (2020-07-09) -- metric.values; Issue #34 +- metric.values; Issue \#34 - - Added Piercer as valid FFG entry. + - Added Piercer as valid FFG entry. -- UI.R +- UI.R - - Added version number to title of Shiny app. + - Added version number to title of Shiny app. # MBSStools v1.1.0.9019 (2020-07-02) -- metric.values; Issue #30 - - Add basic QC fixes for non-standard bug files. +- metric.values; Issue \#30 + - Add basic QC fixes for non-standard bug files. # MBSStools v1.1.0.9018 (2020-07-02) -- qc_taxa - - Fix typo in example. +- qc_taxa + - Fix typo in example. # MBSStools v1.1.0.9017 (2020-07-01) -- metric.scores; Issue #29 - - Fish message about 0 individuals always showing. - - Added condition so prints only if relevant. +- metric.scores; Issue \#29 + - Fish message about 0 individuals always showing. + - Added condition so prints only if relevant. # MBSStools v1.1.0.9016 (2020-07-01) -- Update taxa_fish data without an extra column. +- Update taxa_fish data without an extra column. # MBSStools v1.1.0.9015 (2020-06-30) -- Remove SiteID from \_95to16.xls. -- Replace example data files in shiny app (munged Site IDs). -- Update Vignette. +- Remove SiteID from \_95to16.xls. +- Replace example data files in shiny app (munged Site IDs). +- Update Vignette. # MBSStools v1.1.0.9014 (2020-06-30) -- Modify Site IDs in bug (genus and family) and fish data. -- Update Vignette. +- Modify Site IDs in bug (genus and family) and fish data. +- Update Vignette. # MBSStools v1.1.0.9013 (2020-06-26) -- Vignette not rebuilding. - - Replace XLConnect with readxl. - - Java issue. +- Vignette not rebuilding. + - Replace XLConnect with readxl. + - Java issue. # MBSStools v1.1.0.9012 (2020-06-23) -- Update Shiny app to use qc_taxa(); Issue #26 +- Update Shiny app to use qc_taxa(); Issue \#26 # MBSStools v1.1.0.9011 (2020-06-23) -- Update pkgdown website. +- Update pkgdown website. # MBSStools v1.1.0.9010 (2020-06-23) -- metric.values - - QC checks on valid values; Issue #26 +- metric.values + - QC checks on valid values; Issue \#26 # MBSStools v1.1.0.9009 (2020-06-23) -- qc_taxa - - New function; Issue #13 and #26 -- tests - - Add tests for qc_taxa +- qc_taxa + - New function; Issue \#13 and \#26 +- tests + - Add tests for qc_taxa # MBSStools v1.1.0.9008 (2020-05-22) -- taxa_fish - - Update 2 Species name errors so passes QC check. +- taxa_fish + - Update 2 Species name errors so passes QC check. # MBSStools v1.1.0.9007 (2020-05-21) -- Add testing - - DESCRIPTION, add testthat to Suggests - - test PHIcalc, Issue #19 +- Add testing + - DESCRIPTION, add testthat to Suggests + - test PHIcalc, Issue \#19 # MBSStools v1.1.0.9006 (2020-05-20) -- metric.scores.R, Issue #20 - - Update column name checking for user input data frame. - - Edit error message to user. +- metric.scores.R, Issue \#20 + - Update column name checking for user input data frame. + - Edit error message to user. # MBSStools v1.1.0.9005 (2020-05-20) -- metric.scores.R - - Fix error in assigning final IBI due to changes in behavior of - Tibbles. +- metric.scores.R + - Fix error in assigning final IBI due to changes in behavior of + Tibbles. # MBSStools v1.1.0.9004 (2020-05-20) -- Shiny App, Issue #22. - - File upload size increased from 10 to 25 MB. - - Output file format, tsv to csv. - - Zip file download. - - Remove input file (original and transformed). - - Keep only the “results\_” files (values, scores, and plot). +- Shiny App, Issue \#22. + - File upload size increased from 10 to 25 MB. + - Output file format, tsv to csv. + - Zip file download. + - Remove input file (original and transformed). + - Keep only the “results\_” files (values, scores, and plot). # MBSStools v1.1.0.9003 (2020-05-20) -- Update fish metric scoring for no taxa obsevered, Issue #26 - - taxa_fish.rda - - data.r - - metric.scores.r +- Update fish metric scoring for no taxa obsevered, Issue \#26 + - taxa_fish.rda + - data.r + - metric.scores.r # MBSStools v1.1.0.9002 (2020-05-18) -- Update metric.values. - - Error when using R v4.0. Issue #28. +- Update metric.values. + - Error when using R v4.0. Issue \#28. # MBSStools v1.1.0.9001 (2019-06-13) -- Add pkgdown website. - - Examples failed for FlowSum and IonContrib. +- Add pkgdown website. + - Examples failed for FlowSum and IonContrib. # MBSStools v1.1 (2019-06-13) -- Shiny release version +- Shiny release version # MBSStools v1.0.2.9015 (2019-06-13) -- Shiny app, Issue #22 - - Remove link to package vignette (doesn’t work on Shiny.io) +- Shiny app, Issue \#22 + - Remove link to package vignette (doesn’t work on Shiny.io) # MBSStools v1.0.2.9014 (2019-06-13) -- Additional packages to Suggests for the Shiny app, Issue #22 +- Additional packages to Suggests for the Shiny app, Issue \#22 # MBSStools v1.0.2.9013 (2019-06-13) -- Complete Shiny app, Issue #22 +- Complete Shiny app, Issue \#22 # MBSStools v1.0.2.9012 (2019-05-17) -- README - - Update install example to ensure vignettes are installed. +- README + - Update install example to ensure vignettes are installed. # MBSStools v1.0.2.9011 (2019-05-17) -- Update for R v3.6.0, Issue #27 - - README - - Added extra line to make work devtools::install_github() - - DESCRIPTION - - Remove StagedInstall: no -- README - - Update badges. +- Update for R v3.6.0, Issue \#27 + - README + - Added extra line to make work devtools::install_github() + - DESCRIPTION + - Remove StagedInstall: no +- README + - Update badges. # MBSStools v1.0.2.9010 (2019-05-01) -- Shiny app development, Issue #22 - - Not complete. +- Shiny app development, Issue \#22 + - Not complete. # MBSStools v1.0.2.9010 (2019-05-01) -- Revise for staged install for R v3.6.0, Issue #27 - - DESCRIPTION - - StagedInstall: no - - Temporary fix. Still needs to be installed from a local file. -- Edits to Shiny App. Issue #22. - - Incomplete. +- Revise for staged install for R v3.6.0, Issue \#27 + - DESCRIPTION + - StagedInstall: no + - Temporary fix. Still needs to be installed from a local file. +- Edits to Shiny App. Issue \#22. + - Incomplete. # MBSStools v1.0.2.9009 (2019-05-01) -- Revise “EXCLUDE” column in benthic data from “Y” and “” to TRUE and - FALSE. - Issue #25. - - data - - taxa_bugs_family - - taxa_bugs_genus, ProcessData had additional issues that - weren’t present in prior versions. - - function; metric.values - - Function help text - - Example use “MetricName.Other” rather than “Metric” to get - pertinent metrics. - - Replace EXCLUDE!=“Y” with EXCLUDE!=TRUE -- Vignette - - Example for installing a package (line 51) had a typo. - - droplevels update for MetricName.Other (line 110, 161, and 187). - - Shiny example code, eval=FALSE +- Revise “EXCLUDE” column in benthic data from “Y” and “” to TRUE and + FALSE. + Issue \#25. + - data + - taxa_bugs_family + - taxa_bugs_genus, ProcessData had additional issues that weren’t + present in prior versions. + - function; metric.values + - Function help text + - Example use “MetricName.Other” rather than “Metric” to get + pertinent metrics. + - Replace EXCLUDE!=“Y” with EXCLUDE!=TRUE +- Vignette + - Example for installing a package (line 51) had a typo. + - droplevels update for MetricName.Other (line 110, 161, and 187). + - Shiny example code, eval=FALSE # MBSStools v1.0.2.9008 (2019-02-21) -- Revised scoring thresholds table, per MBSS. Issue #23. -- metric.scores.R - - Update example code to match the MBSS metric names. - - Slight tweaking of QC check for column names. +- Revised scoring thresholds table, per MBSS. Issue \#23. +- metric.scores.R + - Update example code to match the MBSS metric names. + - Slight tweaking of QC check for column names. # MBSStools v1.0.2.9007 (2019-02-12) -- Shiny app, Issue #22 -- Include function to launch the Shiny app. - - runShiny - - Add to Vignette. +- Shiny app, Issue \#22 +- Include function to launch the Shiny app. + - runShiny + - Add to Vignette. # MBSStools v1.0.2.9006 (2017-07-31) -- metric.scores - - Add example of adding narrative to IBI scores. Issue #21. +- metric.scores + - Add example of adding narrative to IBI scores. Issue \#21. # MBSStools v1.0.2.9005 (2017-07-31) -- DESCRIPTION - - Suggests; XLConnect (MBSStools_vignette.Rmd) - - Maintainer; (Needed if submit to - CRAN) - - Description; make more verbose. (Needed if submit to CRAN) - - Title; remove ending period. -- NEWS - - Restructure. Still not right but has all info now. - - Remove planned updates. -- Shorten long lines. - - FlowSum.R - - IonContrib.R - - MapTaxaObs.R - - metric.scores.R - - metric.values.R - - PHIcalc.R -- Remove “keywords” (incorrect usage). - - FlowSum.R - - IonContrib.R - - MapTaxaObs.R - - metric.scores.R - - metric.values.R - - PHIcalc.R +- DESCRIPTION + - Suggests; XLConnect (MBSStools_vignette.Rmd) + - Maintainer; (Needed if submit to CRAN) + - Description; make more verbose. (Needed if submit to CRAN) + - Title; remove ending period. +- NEWS + - Restructure. Still not right but has all info now. + - Remove planned updates. +- Shorten long lines. + - FlowSum.R + - IonContrib.R + - MapTaxaObs.R + - metric.scores.R + - metric.values.R + - PHIcalc.R +- Remove “keywords” (incorrect usage). + - FlowSum.R + - IonContrib.R + - MapTaxaObs.R + - metric.scores.R + - metric.values.R + - PHIcalc.R # MBSStools v1.0.2.9004 (2017-07-31) -- .travis.yml - - Add TravisCI yml to GitHub directory. - - Add TravisCI yml to Rbuildignore. +- .travis.yml + - Add TravisCI yml to GitHub directory. + - Add TravisCI yml to Rbuildignore. # MBSStools v1.0.2.9003 (2017-07-30) -- Add continuous integration (TravisCI) badge to ReadMe. +- Add continuous integration (TravisCI) badge to ReadMe. # MBSStools v1.0.2.9002 (2017-07-25) -- DESCRIPTION -- Move dplyr and rgdal from Suggests to Imports - - Packages not always loading. Issue #15 and Issue #17 -- Modify minimum version of R from 3.3.2 to 3.4.0. - - MapTaxaObs did not work in earlier version of R. - Updated to v3.4.0 and no issue. Issue #17. +- DESCRIPTION +- Move dplyr and rgdal from Suggests to Imports + - Packages not always loading. Issue \#15 and Issue \#17 +- Modify minimum version of R from 3.3.2 to 3.4.0. + - MapTaxaObs did not work in earlier version of R. + Updated to v3.4.0 and no issue. Issue \#17. # MBSStools v1.0.2.9001 (2017-05-11) -- Issue #17 with MapTaxaObs -- Removed extra file in vignette folder. -- Update Vignette as doesn’t build in check; commented out MapTaxaObs. +- Issue \#17 with MapTaxaObs +- Removed extra file in vignette folder. +- Update Vignette as doesn’t build in check; commented out MapTaxaObs. # MBSStools v1.0.2.0000 (2017-10-26) -- Corrected metric.score() \[line 181\] for fish for “HIGHLANDS” was - incorrectly designated. These sites were not getting a final FIBI - score. +- Corrected metric.score() \[line 181\] for fish for “HIGHLANDS” was + incorrectly designated. These sites were not getting a final FIBI + score. # MBSStools v1.0.1.0000 (2017-09-26) -- Update each function’s description and vignette with the packages - needed for that function to work properly. +- Update each function’s description and vignette with the packages + needed for that function to work properly. -- Update Vignette for a few typos and so shows in final package. Also - messages=FALSE for XLConnect example. +- Update Vignette for a few typos and so shows in final package. Also + messages=FALSE for XLConnect example. -- DESCRIPTION. Move rgdal from Depends to Suggests. +- DESCRIPTION. Move rgdal from Depends to Suggests. -- Fish metric example not working in metric.values(). Issue #14. - Extra parameter. Removed and works. +- Fish metric example not working in metric.values(). Issue \#14. + Extra parameter. Removed and works. # MBSStools v1.0.0.0000 (2017-09-24) -- Release version 1. +- Release version 1. # MBSStools v0.0.0.9018 (2017-09-24) -- Add install guide notebook. +- Add install guide notebook. -- Tweak vignette. +- Tweak vignette. -- Update Readme. +- Update Readme. -- Final version before going to v1.0.0. +- Final version before going to v1.0.0. -- IonContrib, ensure data input is a data frame. +- IonContrib, ensure data input is a data frame. -- PHI, ensure data input is a data frame. +- PHI, ensure data input is a data frame. # MBSStools v0.0.0.9017 (2017-09-20) -- Update vignette. +- Update vignette. -- Fixed example for fish metrics in metric.values(). 20170920. +- Fixed example for fish metrics in metric.values(). 20170920. # MBSStools v0.0.0.9016 (2017-09-19) -- IonContrib() added barplot example. 20170919. +- IonContrib() added barplot example. 20170919. # MBSStools v0.0.0.9015 (2017-09-13) -- Fix typo in example for metric.scores(); “Metrics.Bugs.Scores” to - “Metrics.Bugs.Scores.MBSS”. 20170913. +- Fix typo in example for metric.scores(); “Metrics.Bugs.Scores” to + “Metrics.Bugs.Scores.MBSS”. 20170913. # MBSStools v0.0.0.9014 (2017-09-09) -- Added MSW (family) data, values, and scores. 20170909. +- Added MSW (family) data, values, and scores. 20170909. # MBSStools v0.0.0.9013 (2017-09-09) -- Added BIBI. -- Updated metric names to match those used by MBSS. -- Updated metric.values() and metric.scores(). -- Updated genus level bug data file. +- Added BIBI. +- Updated metric names to match those used by MBSS. +- Updated metric.values() and metric.scores(). +- Updated genus level bug data file. # MBSStools v0.0.0.9012 (2017-09-08) -- Add FIBI. 2017-09-05. -- metric.values.R -- metric.score.R -- example data files -- -raw.scoring.tab and metric adjustment -- Added dplyr to DESCRIPTION. Needed for metric values and scores. - 20170908 -- Modified -raw.scoring.tab to resolve QC issues with 2016 - data. 20170908. +- Add FIBI. 2017-09-05. +- metric.values.R +- metric.score.R +- example data files +- -raw.scoring.tab and metric adjustment +- Added dplyr to DESCRIPTION. Needed for metric values and scores. + 20170908 +- Modified -raw.scoring.tab to resolve QC issues with 2016 data. + 20170908. # MBSStools 0.0.0.9011 (2017-08-22) -- Updated taxa map data for typo in “no fish observed”. 20170822. +- Updated taxa map data for typo in “no fish observed”. 20170822. # MBSStools v0.0.0.9010 (2017-07-31) -- Updated fish data and crosswalk table examples so have more matched - data. - Also update help to remind that data has to be on the first - worksheet for the Excel file. 20170731. +- Updated fish data and crosswalk table examples so have more matched + data. + Also update help to remind that data has to be on the first worksheet + for the Excel file. 20170731. # MBSStools v0.0.0.9009 (2017-07-28) -- Updated DESCRIPTION. “Erik” to “Erik W.” and added Matt Ashton as - data contributor. 20170728. +- Updated DESCRIPTION. “Erik” to “Erik W.” and added Matt Ashton as data + contributor. 20170728. # MBSStools v0.0.0.9008 (2017-07-21) -- Added TaxaMapsObs(). Issue #2. 20170720. +- Added TaxaMapsObs(). Issue \#2. 20170720. -- Libraries readxl (suggested) and rgdal (required) added to - DESCRIPTION. - Maps won’t generate without rgdal loaded. 20170720. +- Libraries readxl (suggested) and rgdal (required) added to + DESCRIPTION. + Maps won’t generate without rgdal loaded. 20170720. -- Added example data and GIS files (zipped). 20170721. +- Added example data and GIS files (zipped). 20170721. # MBSStools v0.0.0.9007 (2017-06-23) -- Added “LazyData: true” to DESCRIPTION. Data was not being loaded - properly. - Issue #9. 20170623. +- Added “LazyData: true” to DESCRIPTION. Data was not being loaded + properly. + Issue \#9. 20170623. # MBSStools v0.0.0.9006 (2017-06-23) -- Modified vignette. +- Modified vignette. -- Modified data-raw Process data R files (wd). +- Modified data-raw Process data R files (wd). -- Added IonContrib.R +- Added IonContrib.R # MBSStools v0.0.0.9005 (2017-06-14) -- Added vignette for documentation of each function and the library as - a whole. +- Added vignette for documentation of each function and the library as a + whole. # MBSStools v0.0.0.9004 (2017-04-28) -- Address issues with PHIcalc from testing. Removed extra rows from - Excel import for data MBSS.PHI. Added line to convert values to - numeric inside MBSS.PHI. (not complete) +- Address issues with PHIcalc from testing. Removed extra rows from + Excel import for data MBSS.PHI. Added line to convert values to + numeric inside MBSS.PHI. (not complete) # MBSStools v0.0.0.9003 (2017-04-21) -- FlowSum(). Added Error Handling for misidentified Channels. - Updated data MBSS.flow. +- FlowSum(). Added Error Handling for misidentified Channels. + Updated data MBSS.flow. # MBSStools v0.0.0.9002 (2017-04-20) -- Flow sum calculation completed. Included Channel Number as grouping - variable but sum across channels to get the total site flow. +- Flow sum calculation completed. Included Channel Number as grouping + variable but sum across channels to get the total site flow. -- PHI, edit script for outlining in RStudio. +- PHI, edit script for outlining in RStudio. -- PHI.calc() to PHIcalc(). +- PHI.calc() to PHIcalc(). -- Data.R and folder “data-raw”. +- Data.R and folder “data-raw”. -- PHI, tweak for created data. Using Excel to build rda rather than - txt file from the Excel. +- PHI, tweak for created data. Using Excel to build rda rather than txt + file from the Excel. # MBSStools v0.0.0.9001 (2017-03-29) -- Completed PHI calculation. +- Completed PHI calculation. # MBSStools v0.0.0.9000 (2017-03-27) -- Created GitHub repository. +- Created GitHub repository. -- Added ReadME.RMD and NEWS.RMD +- Added ReadME.RMD and NEWS.RMD -- PHI calculation started. +- PHI calculation started. diff --git a/NEWS.rmd b/NEWS.rmd index 4babad5..855c006 100644 --- a/NEWS.rmd +++ b/NEWS.rmd @@ -17,6 +17,13 @@ knitr::opts_chunk$set( cat(paste0("Last Update: ",Sys.time())) ``` +MBSStools v1.1.0.9056 (2024-04-05) +================ +* fix: Revise family BIBI scoring thresholds, Issue #45 +* test: Added test for extra digits for scoring thresholds +* refactor: Update vignette for IBI calculations, Issue #45 + + StringAsFactors default now FALSE so don't have to remove in Vignette + MBSStools v1.1.0.9055 (2022-01-12) ================ * refactor: Update GitHub repo default branch from 'master' to 'main' diff --git a/R/metric.scores.R b/R/metric.scores.R index e526f2e..f8db003 100644 --- a/R/metric.scores.R +++ b/R/metric.scores.R @@ -4,6 +4,11 @@ #' Can generate scores for 1/3/5 (ScoreRegime="135") for MD DNR MBSS FIBI and #' BIBI. #' +#' The function reads the upper limit as greater than or equal (>=). For this +#' reason the Family BIBI thresholds were tweaked and so do not match the +#' published values. The published values use greater than (>) and don't match +#' the mathematical operation used in this function. +#' #' The inputs and outputs have been designed to mimic those used by MBSS staff. #' #' The R library dplyr is needed for this function. diff --git a/data-raw/ProcessData_IBI_metrics.scoring.R b/data-raw/ProcessData_IBI_metrics.scoring.R index eb7ca84..8b41bc3 100644 --- a/data-raw/ProcessData_IBI_metrics.scoring.R +++ b/data-raw/ProcessData_IBI_metrics.scoring.R @@ -7,6 +7,8 @@ # Erik.Leppo@tetratech.com # 20170601 # 20170907, MBSS fish metric names +# 20240405, Tomas, update Fam BIBI due to > vs. >= for upper threshold +# to avoid scientific notation import with column classes specified #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 0. Prep #### @@ -17,16 +19,19 @@ wd <- getwd() # 1. Get data and Process ##### # 1.1. Import Data myFile <- "metrics.scoring.tab" -data.import <- read.delim(file.path(".","data-raw",myFile)) +myClasses <- c(rep("character", 4), rep("numeric", 2), rep("character", 2)) +data.import <- read.delim(file.path("data-raw", myFile), colClasses = myClasses) +# ignore NAs introduced by coercion # 1.2. Process Data View(data.import) names(data.import) dim(data.import) +str(data.import) ##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 2. Save as RDA for Use in Package #### # metrics_scoring <- data.import -devtools::use_data(metrics_scoring, overwrite = TRUE) +usethis::use_data(metrics_scoring, overwrite = TRUE) diff --git a/data-raw/metrics.scoring.tab b/data-raw/metrics.scoring.tab index 0319f91..872378a 100644 --- a/data-raw/metrics.scoring.tab +++ b/data-raw/metrics.scoring.tab @@ -38,24 +38,24 @@ MBSS.2005.Fish HIGHLAND pi_tv_toler Increase 39 80 135 PTOL MBSS.2005.Fish HIGHLAND pi_genomninvrt Increase 61 96 135 PGEOMIV MBSS.2005.Fish HIGHLAND pi_insectivore Decrease 1 33 135 P_IS MBSS.2005.Fish HIGHLAND pi_dom01 Increase 38 89 135 PABDOM -MBSS.2005.Fish COLD ni_m2 Increase 0.88 2.2399999999999999 135 ABUNSQM +MBSS.2005.Fish COLD ni_m2 Increase 0.88 2.24 135 ABUNSQM MBSS.2005.Fish COLD pi_tv_toler Increase 22 81 135 PTOL MBSS.2005.Fish COLD pi_brooktrout Decrease 0.0000000000000001 14 135 PBROOK MBSS.2005.Fish COLD pi_sculpin Decrease 0.0000000000000001 44 135 PSCULP -MSW.1999.Bugs CP nt_total Decrease 8 16 135 ntaxa -MSW.1999.Bugs CP nt_EPT Decrease 3 6 135 nept -MSW.1999.Bugs CP nt_Ephem Decrease 1 2 135 nephem -MSW.1999.Bugs CP nt_Dipt Decrease 2 3 135 ndipt -MSW.1999.Bugs CP pi_Ephem Decrease 2 11.4 135 pephem -MSW.1999.Bugs CP nt_tv_intol Decrease 2 5 135 nintol_FAM -MSW.1999.Bugs CP x_Becks Decrease 4 9 135 becks -MSW.1999.Bugs NCP nt_total Decrease 9 14 135 ntaxa -MSW.1999.Bugs NCP nt_EPT Decrease 4 10 135 nept -MSW.1999.Bugs NCP nt_Ephem Decrease 2 3 135 nephem -MSW.1999.Bugs NCP nt_Dipt Decrease 2 3 135 ndipt -MSW.1999.Bugs NCP pi_Ephem Decrease 5.7 20.3 135 pephem -MSW.1999.Bugs NCP nt_tv_intol Decrease 4 8 135 nintol_FAM -MSW.1999.Bugs NCP x_Becks Decrease 8 12.5 135 becks +MSW.1999.Bugs CP nt_total Decrease 8 17 135 ntaxa +MSW.1999.Bugs CP nt_EPT Decrease 3 7 135 nept +MSW.1999.Bugs CP nt_Ephem Decrease 1 3 135 nephem +MSW.1999.Bugs CP nt_Dipt Decrease 2 4 135 ndipt +MSW.1999.Bugs CP pi_Ephem Decrease 2 11.40001 135 pephem +MSW.1999.Bugs CP nt_tv_intol Decrease 2 6 135 nintol_FAM +MSW.1999.Bugs CP x_Becks Decrease 4 9.00001 135 becks +MSW.1999.Bugs NCP nt_total Decrease 9 15 135 ntaxa +MSW.1999.Bugs NCP nt_EPT Decrease 4 11 135 nept +MSW.1999.Bugs NCP nt_Ephem Decrease 2 4 135 nephem +MSW.1999.Bugs NCP nt_Dipt Decrease 2 4 135 ndipt +MSW.1999.Bugs NCP pi_Ephem Decrease 5.7 20.30001 135 pephem +MSW.1999.Bugs NCP nt_tv_intol Decrease 4 9 135 nintol_FAM +MSW.1999.Bugs NCP x_Becks Decrease 8 12.50001 135 becks WSA.2006.Bugs CPL pi_nonInsect 100 pi_nonInsect WSA.2006.Bugs CPL x_Shan_e 100 x_Shan_e WSA.2006.Bugs CPL nt_ffg_shred 100 nt_ffg_shred diff --git a/data/metrics_scoring.rda b/data/metrics_scoring.rda index 3afdfa0..c13c7b0 100644 Binary files a/data/metrics_scoring.rda and b/data/metrics_scoring.rda differ diff --git a/inst/shiny-examples/MBSStools/ui.R b/inst/shiny-examples/MBSStools/ui.R index c7a9c85..df01aaa 100644 --- a/inst/shiny-examples/MBSStools/ui.R +++ b/inst/shiny-examples/MBSStools/ui.R @@ -19,7 +19,7 @@ library(shinyjs) # used for togglestate of download button shinyUI(fluidPage( # Application title - titlePanel("MBSStools, IBI Calculator, v1.1.0.9054"), + titlePanel("MBSStools, IBI Calculator, v1.1.0.9055"), # SideBar sidebarLayout( diff --git a/man/metric.scores.Rd b/man/metric.scores.Rd index 795c2a3..2faffa3 100644 --- a/man/metric.scores.Rd +++ b/man/metric.scores.Rd @@ -29,6 +29,11 @@ Can generate scores for 1/3/5 (ScoreRegime="135") for MD DNR MBSS FIBI and BIBI. } \details{ +The function reads the upper limit as greater than or equal (>=). For this +reason the Family BIBI thresholds were tweaked and so do not match the +published values. The published values use greater than (>) and don't match +the mathematical operation used in this function. + The inputs and outputs have been designed to mimic those used by MBSS staff. The R library dplyr is needed for this function. diff --git a/tests/testthat/test-PHI.R b/tests/testthat/test_PHI.R similarity index 100% rename from tests/testthat/test-PHI.R rename to tests/testthat/test_PHI.R diff --git a/tests/testthat/test-qc_taxa.R b/tests/testthat/test_qc_taxa.R similarity index 100% rename from tests/testthat/test-qc_taxa.R rename to tests/testthat/test_qc_taxa.R diff --git a/tests/testthat/test_thresholds_numdigits.R b/tests/testthat/test_thresholds_numdigits.R new file mode 100644 index 0000000..959c920 --- /dev/null +++ b/tests/testthat/test_thresholds_numdigits.R @@ -0,0 +1,34 @@ +# Thresholds, Num Digits, Index ---- +## Borrowed from BioMonTools pacakge then modified, 20240405 +test_that("thresholds, num digits, index", { + # Packages + # no extras neeeded + + # Thresholds + df_thresh_metric <- metrics_scoring + + # Number of Characters (as character) + metric_thresh_lo <- nchar(as.character(df_thresh_metric$Thresh_Lo)) + metric_thresh_hi <- nchar(as.character(df_thresh_metric$Thresh_Hi)) + + # Number of "bad" entries + # Max is 11 (MBSS) + digmax <- 11 + # after that is most likely a floating point error that needs correction + metric_thresh_lo_nbad <- sum(metric_thresh_lo > digmax, na.rm = TRUE) + metric_thresh_hi_nbad <- sum(metric_thresh_hi > digmax, na.rm = TRUE) + + # Find those rows in Excel with errors + which(metric_thresh_lo %in% metric_thresh_lo[metric_thresh_lo > digmax]) + which(metric_thresh_hi %in% metric_thresh_hi[metric_thresh_hi > digmax]) + + # test + testthat::expect_true(metric_thresh_lo_nbad == 0) + testthat::expect_true(metric_thresh_hi_nbad == 0) + + # Easiest to View df and find visually + # View(df_thresh_metric) + +})## Test ~ thresholds, num digits ~ END + +#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/vignettes/MBSStools_vignette.Rmd b/vignettes/MBSStools_vignette.Rmd index a60a9fa..8f3fe60 100644 --- a/vignettes/MBSStools_vignette.Rmd +++ b/vignettes/MBSStools_vignette.Rmd @@ -137,7 +137,7 @@ myIndex <- "MBSS.2005.Fish" # Thresholds thresh <- metrics_scoring # get metric names for myIndex -(myMetrics.Fish <- as.character(droplevels(unique(thresh[thresh[,"Index.Name"]==myIndex,"MetricName.Other"])))) +(myMetrics.Fish <- as.character(unique(thresh[thresh[,"Index.Name"]==myIndex,"MetricName.Other"]))) # Taxa Data myDF.Fish <- taxa_fish myMetric.Values.Fish <- metric.values(myDF.Fish, "fish", myMetrics.Fish, TRUE) @@ -192,7 +192,7 @@ myIndex <- "MBSS.2005.Bugs" # Thresholds thresh <- metrics_scoring # get metric names for myIndex -(myMetrics.Bugs.MBSS <- as.character(droplevels(unique(thresh[thresh[,"Index.Name"]==myIndex,"MetricName.Other"])))) +(myMetrics.Bugs.MBSS <- as.character(unique(thresh[thresh[,"Index.Name"]==myIndex,"MetricName.Other"]))) # Taxa Data myDF.Bugs.MBSS <- taxa_bugs_genus myMetric.Values.Bugs.MBSS <- metric.values(myDF.Bugs.MBSS, "bugs", myMetrics.Bugs.MBSS) @@ -235,7 +235,7 @@ myIndex <- "MSW.1999.Bugs" # Thresholds thresh <- metrics_scoring # get metric names for myIndex -(myMetrics.Bugs.MSW <- as.character(droplevels(unique(thresh[thresh[,"Index.Name"]==myIndex,"MetricName.Other"])))) +(myMetrics.Bugs.MSW <- as.character(unique(thresh[thresh[,"Index.Name"]==myIndex,"MetricName.Other"]))) # Taxa Data myDF.Bugs.MSW <- taxa_bugs_family myMetric.Values.Bugs.MSW <- metric.values(myDF.Bugs.MSW, "bugs", myMetrics.Bugs.MSW)