Skip to content

Commit

Permalink
v1.0.2.9066
Browse files Browse the repository at this point in the history
* refactor: Add fish metric permutations of non-native
    + MetricNames.xlsx
    + metric_values.R
  • Loading branch information
leppott committed Nov 7, 2024
1 parent 864c54b commit 740de91
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 5 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.9065
Version: 1.0.2.9066
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-06 16:56:01.846738
#> Last Update: 2024-11-07 08:37:32.794045

# Version History

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

- refactor: Add fish metric permutations of non-native
- MetricNames.xlsx
- metric_values.R

## Changes in version 1.0.2.9065 (2024-11-06)

- fix: Modify fish metrics BCG_ATTR2 to convert to upper case
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-06 16:56:01.846738
#> Last Update: 2024-11-07 08:37:32.794045

# Version History

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

- refactor: Add fish metric permutations of non-native
- MetricNames.xlsx
- metric_values.R

## Changes in version 1.0.2.9065 (2024-11-06)

- fix: Modify fish metrics BCG_ATTR2 to convert to upper case
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.9066 (2024-11-07)

* refactor: Add fish metric permutations of non-native
+ MetricNames.xlsx
+ metric_values.R

## Changes in version 1.0.2.9065 (2024-11-06)

* fix: Modify fish metrics BCG_ATTR2 to convert to upper case
Expand Down
13 changes: 12 additions & 1 deletion R/metric_values.R
Original file line number Diff line number Diff line change
Expand Up @@ -4257,6 +4257,8 @@ metric.values.fish <- function(myDF
, pi_Ictal = 100 * sum(N_TAXA[FAMILY == "ICTALURIDAE"], na.rm = TRUE) / ni_total
, pi_native = 100 * sum(N_TAXA[NATIVE == "NATIVE"], na.rm = TRUE) / ni_total
, pi_nonnative = 100 * sum(N_TAXA[is.na(NATIVE) | NATIVE != "NATIVE"], na.rm = TRUE) / ni_total
, pi_nonnative_NotNativeNotNA = 100 * sum(N_TAXA[NATIVE != "NATIVE"], na.rm = TRUE) / ni_total
, pi_nonnative_OnlyNonNative = 100 * sum(N_TAXA[NATIVE == "NON-NATIVE"], na.rm = TRUE) / ni_total
, pi_Notur = 100 * sum(N_TAXA[GENUS == "NOTURUS"], na.rm = TRUE) / ni_total
, pi_sculpin = 100 * sum(N_TAXA[TYPE == "SCULPIN"], na.rm = TRUE) / ni_total
, pi_Lepomis = 100 * sum(N_TAXA[GENUS == "LEPOMIS"], na.rm = TRUE) / ni_total
Expand Down Expand Up @@ -4297,7 +4299,14 @@ metric.values.fish <- function(myDF
, nt_natCyprin = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & NATIVE == "NATIVE" & FAMILY == "CYPRINIDAE"], na.rm = TRUE)
, nt_Lepomis = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & GENUS == "LEPOMIS"], na.rm = TRUE)
, nt_native = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & NATIVE == "NATIVE" & N_TAXA > 0], na.rm = TRUE)
, nt_nonnative = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & (is.na(NATIVE) | NATIVE != "NATIVE")
, nt_nonnative = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE
& (is.na(NATIVE) | NATIVE != "NATIVE")
& N_TAXA > 0], na.rm = TRUE)
, nt_nonnative_NotNativeNotNA = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE
& (NATIVE != "NATIVE")
& N_TAXA > 0], na.rm = TRUE)
, nt_nonnative_OnlyNonNative = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE
& (NATIVE == "NON-NATIVE")
& N_TAXA > 0], na.rm = TRUE)
, nt_nativenonhybrid = dplyr::n_distinct(TAXAID[EXCLUDE != TRUE & NATIVE == "NATIVE" &
(HYBRID != TRUE | is.na(HYBRID))], na.rm = TRUE)
Expand Down Expand Up @@ -4341,6 +4350,8 @@ metric.values.fish <- function(myDF
, pt_Lepomis = 100 * nt_Lepomis / nt_total
, pt_native = 100 * nt_native / nt_total
, pt_nonnative = 100 * nt_nonnative / nt_total
, pt_nonnative_NotNativeNotNA = 100 * nt_nonnative_NotNativeNotNA / nt_total
, pt_nonnative_OnlyNonNative = 100 * nt_nonnative_OnlyNonNative / nt_total
, pt_Notur = 100 * nt_Notur / nt_total
, pt_Salm = 100 * nt_Salm / nt_total
, pt_connect = 100 * nt_connect / 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.9065"
pkg_version <- "1.0.2.9066"

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

0 comments on commit 740de91

Please sign in to comment.