Skip to content

Commit

Permalink
v1.0.2.9067
Browse files Browse the repository at this point in the history
* refactor: Add fish metrics; nt/pi/pt BCG_att4 b/m/2
    + MetricNames.xlsx
    + metric_values.R
  • Loading branch information
leppott committed Nov 20, 2024
1 parent 740de91 commit 738b48d
Show file tree
Hide file tree
Showing 7 changed files with 40 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.9066
Version: 1.0.2.9067
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-07 08:37:32.794045
#> Last Update: 2024-11-20 08:24:14.42573

# Version History

## Changes in version 1.0.2.9067 (2024-11-20)

- refactor: Add fish metrics; nt/pi/pt BCG_att4 b/m/2
- MetricNames.xlsx
- metric_values.R

## Changes in version 1.0.2.9066 (2024-11-07)

- refactor: Add fish metric permutations of non-native
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-07 08:37:32.794045
#> Last Update: 2024-11-20 08:24:14.42573

# Version History

## Changes in version 1.0.2.9067 (2024-11-20)

- refactor: Add fish metrics; nt/pi/pt BCG_att4 b/m/2
- MetricNames.xlsx
- metric_values.R

## Changes in version 1.0.2.9066 (2024-11-07)

- refactor: Add fish metric permutations of non-native
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.9067 (2024-11-20)

* refactor: Add fish metrics; nt/pi/pt BCG_att4 b/m/2
+ MetricNames.xlsx
+ metric_values.R

## Changes in version 1.0.2.9066 (2024-11-07)

* refactor: Add fish metric permutations of non-native
Expand Down
18 changes: 18 additions & 0 deletions R/metric_values.R
Original file line number Diff line number Diff line change
Expand Up @@ -4565,6 +4565,15 @@ metric.values.fish <- function(myDF
& BCG_ATTR == "4"
& NATIVE == "NATIVE"]
, na.rm = TRUE)
, nt_BCG_att4b = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE
& (BCG_ATTR2 == "4_BETTER")]
, na.rm = TRUE)
, nt_BCG_att4m = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE
& (BCG_ATTR2 == "4_MIDDLE")]
, na.rm = TRUE)
, nt_BCG_att4w = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE
& (BCG_ATTR2 == "4_WORSE")]
, na.rm = TRUE)
, nt_BCG_att4w5 = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE
& BCG_ATTR2 == "4_WORSE"]
, na.rm = TRUE) +
Expand Down Expand Up @@ -4677,6 +4686,12 @@ metric.values.fish <- function(myDF
, pi_BCG_att4native = 100 * sum(N_TAXA[BCG_ATTR == "4"
& NATIVE == "NATIVE"]
, na.rm = TRUE) / ni_total
, pi_BCG_att4b = 100 * sum(N_TAXA[(BCG_ATTR2 == "4_BETTER")]
, na.rm = TRUE) / ni_total
, pi_BCG_att4m = 100 * sum(N_TAXA[(BCG_ATTR2 == "4_MIDDLE")]
, na.rm = TRUE) / ni_total
, pi_BCG_att4w = 100 * sum(N_TAXA[(BCG_ATTR2 == "4_WORSE")]
, na.rm = TRUE) / ni_total
, pi_BCG_att4w5 = 100 * (sum(N_TAXA[BCG_ATTR2 == "4_WORSE"]
, na.rm = TRUE) +
sum(N_TAXA[BCG_ATTR == "5"]
Expand Down Expand Up @@ -4742,6 +4757,9 @@ metric.values.fish <- function(myDF
, pt_BCG_att3native = 100 * nt_BCG_att3native / nt_total
, pt_BCG_att4 = 100 * nt_BCG_att4 / nt_total
, pt_BCG_att4native = 100 * nt_BCG_att4native / nt_total
, pt_BCG_att4b = 100 * nt_BCG_att4b / nt_total
, pt_BCG_att4m = 100 * nt_BCG_att4m / nt_total
, pt_BCG_att4w = 100 * nt_BCG_att4w / nt_total
, pt_BCG_att4w5 = 100 * nt_BCG_att4w5 / nt_total
, pt_BCG_att5 = 100 * nt_BCG_att5 / nt_total
, pt_BCG_att5native = 100 * nt_BCG_att5native / 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.9066"
pkg_version <- "1.0.2.9067"

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

0 comments on commit 738b48d

Please sign in to comment.