From 9f279030d4fe985cfc355cfeab78b9e46d7eefe9 Mon Sep 17 00:00:00 2001 From: Kent Johnson Date: Mon, 14 Jun 2021 13:46:16 -0400 Subject: [PATCH] If there is only one Slide ID, don't offer to remove it as a prefix. Things will break if you do #46 --- DESCRIPTION | 2 +- NEWS.md | 7 ++++++- inst/analysis_app/server.R | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index c1cf382..deff601 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: phenoptrReports Title: Create reports using Phenoptics data -Version: 0.2.12.9000 +Version: 0.2.13 Date: 2021-06-10 Authors@R: c( person("Kent S", "Johnson", role = c("aut", "cre"), diff --git a/NEWS.md b/NEWS.md index d0686d1..b2daf16 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,8 +1,13 @@ +# phenoptrReports 0.2.13 +**2021-06-14** + +Analysis addin: +- Fix problems with chart generation #46 + # phenoptrReports 0.2.12 **2021-06-10** - Fix a critical bug in the consolidate and summarize addin -- Fix problems with chart generation in the analyze addin #46 # phenoptrReports 0.2.11 **2021-06-01** diff --git a/inst/analysis_app/server.R b/inst/analysis_app/server.R index 675e418..f91b8b3 100644 --- a/inst/analysis_app/server.R +++ b/inst/analysis_app/server.R @@ -66,8 +66,9 @@ shinyServer(function(input, output, server) { # Slide ID prefix and aggregation choices if ('Slide ID' %in% names(d)) { + unique_ids = unique(d$`Slide ID`) the_data$slide_id_prefix = slide_id_prefix = - find_common_prefix(unique(d$`Slide ID`)) + ifelse(length(unique_ids) > 1, find_common_prefix(unique_ids), '') by_choices = c('Slide ID', phenoptr::field_column(d)) } else { # No Slide ID column