Commit b7ee6904 authored by Jean-Francois Rey's avatar Jean-Francois Rey
Browse files

Revert "bugfix compare number prop"

This reverts commit 90048c40
parent a7fe4f65
...@@ -20,17 +20,17 @@ server <- function(input, output, session) { ...@@ -20,17 +20,17 @@ server <- function(input, output, session) {
# Test if the cultivars proportion sum is 1 # Test if the cultivars proportion sum is 1
ProportionValidation <- function () { ProportionValidation <- function () {
if (input$demo == "RO") { if (input$demo == "RO") {
sum_prop <- sum <-
((input$prop0 + input$prop1) + (input$prop0 + input$prop2)) / 2 ((input$prop0 + input$prop1) + (input$prop0 + input$prop2)) / 2
} }
else { else {
sum_prop <- input$prop0 + input$prop1 + input$prop2 sum <- input$prop0 + input$prop1 + input$prop2
} }
shinyjs::enable(id = "generateLandscape") shinyjs::enable(id = "generateLandscape")
shiny::removeUI(selector = "#propError") shiny::removeUI(selector = "#propError")
if (!isTRUE(all.equal(sum_prop,1)) || if (sum != 1 ||
is.na(sum_prop)) { is.na(sum)) {
shiny::insertUI( shiny::insertUI(
selector = "#generateLandscape", selector = "#generateLandscape",
where = "afterEnd", where = "afterEnd",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment