Commit 7faa1437 authored by unknown's avatar unknown
Browse files

v0.1.2.32 table of criteria values now returns NA when the criteria is not computable

parent 3f9fdcb3
Package: airGRteaching
Type: Package
Title: Tools to Simplify the Use of the airGR Hydrological Package for Education (Including a Shiny Application)
Version: 0.1.2.31
Version: 0.1.2.32
Date: 2017-04-10
Authors@R: c(person("Olivier", "Delaigue", role = c("aut", "cre"), email = "airGR@irstea.fr"), person("Laurent", "Coron", role = c("aut")), person("Pierre", "Brigode", role = c("aut")), person("Guillaume", "Thirel", role = c("ctb")))
Depends: airGR (>= 1.0.5.22)
......
......@@ -76,7 +76,8 @@ shinyServer(function(input, output, session) {
iCRIT[[iTRSF]][["CRIT"]]
})
})
CRIT <- as.data.frame(matrix(unlist(CRIT), ncol = 2, byrow = TRUE), stringsAsFactors = FALSE)
CRIT <- as.data.frame(matrix(na.omit(unlist(CRIT)), ncol = 2, byrow = TRUE), stringsAsFactors = FALSE)
colnames(CRIT) <- c("Criteria", "Value")
rownames(CRIT) <- NULL
CRIT$Value <- as.numeric(CRIT$Value)
......@@ -166,7 +167,12 @@ shinyServer(function(input, output, session) {
})
output$Criteria <- renderTable({
getRES()$Crit
tabCrit_gauge <- data.frame(Criteria = c("NSE [Q]", "NSE [log(Q)]", "NSE [sqrt(Q)]",
"KGE [Q]", "KGE [log(Q)]", "KGE [sqrt(Q)]"),
ID = 1:6)
tabCrit_out <- merge(tabCrit_gauge, getRES()$Crit, by = "Criteria", all.x = TRUE)
tabCrit_out <- tabCrit_out[order(tabCrit_out$ID), ]
tabCrit_out <- tabCrit_out[, !colnames(tabCrit_out) %in% "ID"]
})
# gc()
})
......
Markdown is supported
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