diff --git a/DESCRIPTION b/DESCRIPTION index 91ec5ae..c75b661 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: BCGcalc Type: Package Title: Biological Condition Gradient, calculator -Version: 2.0.0.9115 +Version: 2.0.0.9116 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 734ea21..730bbe8 100644 --- a/NEWS +++ b/NEWS @@ -1,11 +1,17 @@ BCGcalc-NEWS ================ -2023-11-21 16:49:58.773309 +2023-11-28 15:20:03.506951 - #> Last Update: 2023-11-21 16:49:58.803055 + #> Last Update: 2023-11-28 15:20:03.544012 + +# BCGcalc 2.0.0.9116 (2023-11-28) + +- refactor: File builder taxa translate remove validate statement from + pop up + - Was causing the server to pause and not continue # BCGcalc 2.0.0.9115 (2023-11-21) diff --git a/NEWS.md b/NEWS.md index 734ea21..730bbe8 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,11 +1,17 @@ BCGcalc-NEWS ================ -2023-11-21 16:49:58.773309 +2023-11-28 15:20:03.506951 - #> Last Update: 2023-11-21 16:49:58.803055 + #> Last Update: 2023-11-28 15:20:03.544012 + +# BCGcalc 2.0.0.9116 (2023-11-28) + +- refactor: File builder taxa translate remove validate statement from + pop up + - Was causing the server to pause and not continue # BCGcalc 2.0.0.9115 (2023-11-21) diff --git a/NEWS.rmd b/NEWS.rmd index 1821658..409041b 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.9116 (2023-11-28) + +* refactor: File builder taxa translate remove validate statement from pop up + + Was causing the server to pause and not continue + # BCGcalc 2.0.0.9115 (2023-11-21) * feature: Add pop-up for taxa translate with mismatch taxa diff --git a/inst/shiny-examples/BCGcalc/global.R b/inst/shiny-examples/BCGcalc/global.R index d265581..ede0705 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.9115" +pkg_version <- "2.0.0.9116" # Packages---- # nolint start diff --git a/inst/shiny-examples/BCGcalc/server.R b/inst/shiny-examples/BCGcalc/server.R index d587f91..f165bba 100644 --- a/inst/shiny-examples/BCGcalc/server.R +++ b/inst/shiny-examples/BCGcalc/server.R @@ -789,7 +789,7 @@ shinyServer(function(input, output) { # Increment the progress bar, and update the detail text. incProgress(1/prog_n, detail = prog_detail) Sys.sleep(2 * prog_sleep) - + # Inform user about number of taxa mismatches ## calc number of mismatch df_mismatch <- data.frame(taxatrans_results$nonmatch) @@ -801,7 +801,7 @@ shinyServer(function(input, output) { , type = "info" , closeOnEsc = TRUE , closeOnClickOutside = TRUE) - validate(msg) + #validate(msg) ## Calc, 07, Clean Up ---- prog_detail <- "Calculate, Clean Up" @@ -4995,6 +4995,13 @@ shinyServer(function(input, output) { path_template <- file.path(path_results_user, fn_template) n_skip <- 3 + ### Template, Other + sh_template <- "other" + df_template_other <- readxl::read_excel(path = path_template + , sheet = sh_template + , skip = n_skip) + df_template_other[, "sheet"] <- sh_template + ### Template, Summary, Header ---- sh_template <- "summary_header" df_template_summary_header <- readxl::read_excel(path = path_template @@ -5119,8 +5126,7 @@ shinyServer(function(input, output) { # import each file # Check for column in file df_template_sourcefiles[, "exist_col"] <- NA - - + ## Calc, 03, Data ---- prog_detail <- "Calculation, Create Data Tables" message(paste0("\n", prog_detail)) @@ -5161,7 +5167,10 @@ shinyServer(function(input, output) { class(notes_toc$Link) <- "hyperlink" # compile each in a helper script - + + # Get stations + pk_stations <- df_template_other[df_template_other[, "file"] == "Stations", "primarykey", TRUE] + ### Data, Summary, Header ---- # df_report_summary_header <- mtcars ls_report_summary_header <- build_report_table(df_template_summary_header @@ -5281,7 +5290,20 @@ shinyServer(function(input, output) { Sys.sleep(prog_sleep) # Filter for each Station - + stations_all <- unique(df_report_site[, pk_stations]) + + ## create file for each station + for (s in stations_all) { + # Filter tables + df_report_summary_header_s <- df_report_summary_header + df_report_summary_wide_s <- df_report_summary_wide + df_report_topindicator_s <- df_report_topindicator + df_report_samples_s <- df_report_samples + df_report_flags_s <- df_report_flags + df_report_site_s <- df_report_site + # df_report_taxatrans_s <- df_report_taxatrans + + }## FOR ~ s ### Excel, Create File---- # Create Workbook @@ -5545,13 +5567,14 @@ shinyServer(function(input, output) { openxlsx::addStyle(wb, sheet = "taxatrans", rows = 1, cols = 1:4, style = style_h1) ### Excel, col width ---- + # doesn't seem to work # openxlsx::setColWidths(wb, sheet = "summary", cols = 1:ncol(df_report_summary_wide), widths = "auto") # openxlsx::setColWidths(wb, sheet = "topindicator", cols = 1:ncol(df_report_topindicator), widths = "auto") # openxlsx::setColWidths(wb, sheet = "samples", cols = 1:ncol(df_report_samples), widths = "auto") # openxlsx::setColWidths(wb, sheet = "flags", cols = 1:ncol(df_report_flags), widths = "auto") # openxlsx::setColWidths(wb, sheet = "site", cols = 1:ncol(df_report_site), widths = "auto") # openxlsx::setColWidths(wb, sheet = "taxatrans", cols = 1:ncol(df_report_taxatrans), widths = "auto") - + ### Excel, Conditional Formatting---- #### CF, Fuzzy Thermal----