Skip to content

Commit

Permalink
v1.0.2.9060
Browse files Browse the repository at this point in the history
- refactor: Add new fish metrics (nt\_, pi\_, and pt\_) for invertivore
  - MetricNames.xlsx
  - metric_values.R
  • Loading branch information
leppott committed Nov 5, 2024
1 parent 5a235ac commit d112e09
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: BioMonTools
Type: Package
Title: Tools for Biomonitoring and Bioassessment
Version: 1.0.2.9059
Version: 1.0.2.9060
Author: c(
person("Erik W.", "Leppo", email="[email protected]", role=c("aut","cre")),
person("Jen", "Stamp", role="ctb"),
Expand Down
8 changes: 7 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ NEWS

<!-- NEWS.md is generated from NEWS.Rmd. Please edit that file -->

#> Last Update: 2024-11-01 10:30:11.862667
#> Last Update: 2024-11-05 15:45:57.178726

# Version History

## Changes in version 1.0.2.9060 (2024-11-05)

- refactor: Add new fish metrics (nt\_, pi\_, and pt\_) for invertivore
- MetricNames.xlsx
- metric_values.R

## Changes in version 1.0.2.9059 (2024-11-01)

- refactor: Update search patterns for some fish trophic metrics
Expand Down
8 changes: 7 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ NEWS

<!-- NEWS.md is generated from NEWS.Rmd. Please edit that file -->

#> Last Update: 2024-11-01 10:30:11.862667
#> Last Update: 2024-11-05 15:45:57.178726

# Version History

## Changes in version 1.0.2.9060 (2024-11-05)

- refactor: Add new fish metrics (nt\_, pi\_, and pt\_) for invertivore
- MetricNames.xlsx
- metric_values.R

## Changes in version 1.0.2.9059 (2024-11-01)

- refactor: Update search patterns for some fish trophic metrics
Expand Down
6 changes: 6 additions & 0 deletions NEWS.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ cat(paste0("Last Update: ",Sys.time()))

# Version History

## Changes in version 1.0.2.9060 (2024-11-05)

* refactor: Add new fish metrics (nt_, pi_, and pt_) for invertivore
* MetricNames.xlsx
* metric_values.R

## Changes in version 1.0.2.9059 (2024-11-01)

* refactor: Update search patterns for some fish trophic metrics
Expand Down
5 changes: 5 additions & 0 deletions R/metric_values.R
Original file line number Diff line number Diff line change
Expand Up @@ -4360,6 +4360,9 @@ metric.values.fish <- function(myDF
, nt_herbivore = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE
& TROPHIC_HB == TRUE]
, na.rm = TRUE)
, nt_invertivore = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE
& TROPHIC_IV == TRUE]
, na.rm = TRUE)
, nt_inverttopcarn = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE
& TROPHIC_IV_TC == TRUE]
, na.rm = TRUE)
Expand Down Expand Up @@ -4390,6 +4393,7 @@ metric.values.fish <- function(myDF
, pi_insectivore = 100 * sum(N_TAXA[TROPHIC_IS == TRUE], na.rm = TRUE) / ni_total
, pi_insctCypr = 100 * sum(N_TAXA[TROPHIC_IS == TRUE &
FAMILY == "CYPRINIDAE"], na.rm = TRUE) / ni_total
, pi_invertivore = 100 * sum(N_TAXA[TROPHIC_IV == TRUE], na.rm = TRUE) / ni_total
, pi_inverttopcarn = 100 * sum(N_TAXA[TROPHIC_IV_TC == TRUE], na.rm = TRUE) / ni_total
, pi_omnivore = 100 * sum(N_TAXA[TROPHIC_OM == TRUE], na.rm = TRUE) / ni_total
, pi_planktivore = 100 * sum(N_TAXA[TROPHIC_PL == TRUE], na.rm = TRUE) / ni_total
Expand All @@ -4403,6 +4407,7 @@ metric.values.fish <- function(myDF
, pt_habitat_beninvert = 100 * nt_habitat_beninvert / nt_total
, pt_detritivore = 100 * nt_detritivore / nt_total
, pt_herbivore = 100 * nt_herbivore / nt_total
, pt_invertivore = 100 * nt_invertivore / nt_total
, pt_inverttopcarn = 100 * nt_inverttopcarn / nt_total
, pt_omnivore = 100 * nt_omnivore / nt_total
, pt_planktivore = 100 * nt_planktivore / nt_total
Expand Down
Binary file modified inst/extdata/MetricNames.xlsx
Binary file not shown.
2 changes: 1 addition & 1 deletion inst/shiny-examples/BioMonTools/global.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Shiny Global File

# Version ----
pkg_version <- "1.0.2.9059"
pkg_version <- "1.0.2.9060"

# Packages----
library(BioMonTools)
Expand Down

0 comments on commit d112e09

Please sign in to comment.