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

bugfix compare number prop

parent c40ec6b3
......@@ -20,17 +20,17 @@ server <- function(input, output, session) {
# Test if the cultivars proportion sum is 1
ProportionValidation <- function () {
if (input$demo == "RO") {
sum <-
sum_prop <-
((input$prop0 + input$prop1) + (input$prop0 + input$prop2)) / 2
}
else {
sum <- input$prop0 + input$prop1 + input$prop2
sum_prop <- input$prop0 + input$prop1 + input$prop2
}
shinyjs::enable(id = "generateLandscape")
shiny::removeUI(selector = "#propError")
if (sum != 1 ||
is.na(sum)) {
if (!isTRUE(all.equal(sum_prop,1)) ||
is.na(sum_prop)) {
shiny::insertUI(
selector = "#generateLandscape",
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