From 4616354a6bcd97b6fc50a4544647e207cb69db82 Mon Sep 17 00:00:00 2001 From: Erik Leppo Date: Thu, 1 Feb 2024 10:27:34 -0500 Subject: [PATCH] v2.0.0.9138 - fix: Shiny app fuzzy model not working, change community reference - Also fixed thermal metrics for status message --- DESCRIPTION | 2 +- NEWS | 9 +++++++-- NEWS.md | 9 +++++++-- NEWS.rmd | 5 +++++ inst/shiny-examples/BCGcalc/global.R | 2 +- inst/shiny-examples/BCGcalc/server.R | 18 ++++++++++-------- 6 files changed, 31 insertions(+), 14 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 4a05772..ee78079 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: BCGcalc Type: Package Title: Biological Condition Gradient, calculator -Version: 2.0.0.9137 +Version: 2.0.0.9138 Authors@R: c( person("Erik W.", "Leppo", email="Erik.Leppo@tetratech.com", role=c("aut","cre")), person("Jen", "Stamp", email="Jen.Stamp@tetratech.com", role="ctb"), diff --git a/NEWS b/NEWS index e7b5fba..d051e23 100644 --- a/NEWS +++ b/NEWS @@ -1,11 +1,16 @@ BCGcalc-NEWS ================ -2024-02-01 09:36:01.859784 +2024-02-01 10:23:14.339318 - #> Last Update: 2024-02-01 09:36:01.921951 + #> Last Update: 2024-02-01 10:23:14.673873 + +# BCGcalc 2.0.0.9138 (2024-02-01) + +- fix: Shiny app fuzzy model not working, change community reference + - Also fixed thermal metrics for status message # BCGcalc 2.0.0.9137 (2024-02-01) diff --git a/NEWS.md b/NEWS.md index e7b5fba..d051e23 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,11 +1,16 @@ BCGcalc-NEWS ================ -2024-02-01 09:36:01.859784 +2024-02-01 10:23:14.339318 - #> Last Update: 2024-02-01 09:36:01.921951 + #> Last Update: 2024-02-01 10:23:14.673873 + +# BCGcalc 2.0.0.9138 (2024-02-01) + +- fix: Shiny app fuzzy model not working, change community reference + - Also fixed thermal metrics for status message # BCGcalc 2.0.0.9137 (2024-02-01) diff --git a/NEWS.rmd b/NEWS.rmd index 5da1a42..4e7003e 100644 --- a/NEWS.rmd +++ b/NEWS.rmd @@ -21,6 +21,11 @@ knitr::opts_chunk$set( cat(paste0("Last Update: ",Sys.time())) ``` +# BCGcalc 2.0.0.9138 (2024-02-01) + +* fix: Shiny app fuzzy model not working, change community reference + + Also fixed thermal metrics for status message + # BCGcalc 2.0.0.9137 (2024-02-01) * fix: Update naming scheme for BCG calculation in Shiny app, Issue #87 diff --git a/inst/shiny-examples/BCGcalc/global.R b/inst/shiny-examples/BCGcalc/global.R index 2ea1db4..6327212 100644 --- a/inst/shiny-examples/BCGcalc/global.R +++ b/inst/shiny-examples/BCGcalc/global.R @@ -1,7 +1,7 @@ # Shiny Global File # Version ---- -pkg_version <- "2.0.0.9137" +pkg_version <- "2.0.0.9138" # Packages---- # nolint start diff --git a/inst/shiny-examples/BCGcalc/server.R b/inst/shiny-examples/BCGcalc/server.R index 2a14bf4..37309f0 100644 --- a/inst/shiny-examples/BCGcalc/server.R +++ b/inst/shiny-examples/BCGcalc/server.R @@ -2811,7 +2811,7 @@ shinyServer(function(input, output) { ## Calc, 03, MetVal---- prog_detail <- "Calculate, Metric, Values" message(paste0("\n", prog_detail)) - message(paste0("Community = ", input$si_community)) + message(paste0("Community = ", input$si_community_met_therm)) # Increment the progress bar, and update the detail text. incProgress(1/prog_n, detail = prog_detail) Sys.sleep(prog_sleep) @@ -3090,7 +3090,7 @@ shinyServer(function(input, output) { ## Calc, 4, Rules ---- prog_detail <- "Calculate, BCG Rules" message(paste0("\n", prog_detail)) - message(paste0("Community = ", input$si_community)) + message(paste0("Community = ", input$si_community_modtherm)) # Increment the progress bar, and update the detail text. incProgress(1/prog_n, detail = prog_detail) Sys.sleep(prog_sleep) @@ -3103,10 +3103,11 @@ shinyServer(function(input, output) { pn_rules <- file.path(dn_rules, fn_rules) write.csv(df_rules, pn_rules, row.names = FALSE) + ## Calc, 5, MetVal---- prog_detail <- "Calculate, Metric, Values" message(paste0("\n", prog_detail)) - message(paste0("Community = ", input$si_community)) + message(paste0("Community = ", input$si_community_modtherm)) # Increment the progress bar, and update the detail text. incProgress(1/prog_n, detail = prog_detail) Sys.sleep(prog_sleep) @@ -3114,17 +3115,17 @@ shinyServer(function(input, output) { # QC # df_input <- read.csv(file.path("inst", "extdata", "Data_BCG_PacNW.csv")) # df_metval <- BioMonTools::metric.values(df_input, "bugs", boo.Shiny = TRUE) - + if (length(cols_flags_keep) > 0) { # keep extra cols from Flags (non-metric) df_metval <- BioMonTools::metric.values(df_input - , input$si_community + , input$si_community_modtherm , fun.cols2keep = cols_flags_keep , boo.Shiny = TRUE , verbose = TRUE) } else { df_metval <- BioMonTools::metric.values(df_input - , input$si_community + , input$si_community_modtherm , boo.Shiny = TRUE , verbose = TRUE) }## IF ~ length(col_rules_keep) @@ -3155,7 +3156,8 @@ shinyServer(function(input, output) { dn_metval_slim <- path_results_sub pn_metval_slim <- file.path(dn_metval_slim, fn_metval_slim) write.csv(df_metval_slim, pn_metval_slim, row.names = FALSE) - + + ## Calc, 6, MetMemb---- prog_detail <- "Calculate, Metric, Membership" message(paste0("\n", prog_detail)) @@ -3170,7 +3172,7 @@ shinyServer(function(input, output) { pn_metmemb <- file.path(dn_metmemb, fn_metmemb) write.csv(df_metmemb, pn_metmemb, row.names = FALSE) - + ## Calc, 7, LevMemb---- prog_detail <- "Calculate, Level, Membership" message(paste0("\n", prog_detail))