From b16f0541f76f893225cc3199e756cfecdb034b38 Mon Sep 17 00:00:00 2001
From: Midoux Cedric <cedric.midoux@irstea.fr>
Date: Wed, 22 Apr 2020 10:50:12 +0200
Subject: [PATCH] select 'none'

---
 panels/dataInput.R | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/panels/dataInput.R b/panels/dataInput.R
index 305aad7..30eb46d 100644
--- a/panels/dataInput.R
+++ b/panels/dataInput.R
@@ -281,8 +281,9 @@ transformSample <- function() {
     radioButtons(
       inputId = "transformFun",
       label = "Transform function : ",
-      selected = character(0),
-      choices = c("Proportional Transformation" = "prop", 
+      selected = "none",
+      choices = c("None" = "none", 
+                  "Proportional Transformation" = "prop", 
                   "Square Root Transformation" = "sqrt", 
                   "Centered Log-Ratio (CLR) Transformation" = "clr")
     ),
@@ -299,6 +300,7 @@ transformSample <- function() {
 output$transformFun <- renderText({
   validate(need(input$transformFun, ""))
   switch (input$transformFun,
+          "none" = "",
           "prop" = paste("count_to_prop <- function(x) {return( x / sum(x) )}", 
                          "data_prop <- transform_sample_counts(data, count_to_prop)",
                          sep = "\n"),
@@ -323,6 +325,7 @@ observeEvent(input$transformData, {
   } else {
     try(
       switch (input$transformFun,
+              "none" = {return(physeq())},
               "prop" = {
                 count_to_prop <- function(x) {return( x / sum(x) )}
                 physeq(transform_sample_counts(physeq(), count_to_prop))
-- 
GitLab