Commit 0687c3da authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v0.2.8.21 CLEAN: comment lines removed (critera computation) in server file of the shiny app

parent cb104d82
Package: airGRteaching
Type: Package
Title: Teaching Hydrological Modelling with the GR Rainfall-Runoff Models ('Shiny' Interface Included)
Version: 0.2.8.20
Version: 0.2.8.21
Date: 2020-02-11
Authors@R: c(
person("Olivier", "Delaigue", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7668-8468"), email = "airGR@inrae.fr"),
......
......@@ -4,7 +4,7 @@
### 0.2.8.20 Release Notes (2020-02-11)
### 0.2.8.21 Release Notes (2020-02-11)
#### New features
......
......@@ -180,25 +180,7 @@ shinyServer(function(input, output, session) {
} else {
CRIT <- data.frame(Criterion = NA, Value = NA)
}
# CRIT_opt <- list(Crit = c("ErrorCrit_NSE", "ErrorCrit_KGE"),
# Transfo = c("NO", "sqrt", "inv"))
# CRIT <- lapply(CRIT_opt$Crit, function(iCRIT) {
# Qtransfo <- lapply(CRIT_opt$Transfo, function(iTRSF) {
# iInputsCrit <- SIM$OptionsCrit
# iTRSF <- gsub("NO", "", iTRSF)
# iInputsCrit$transfo <- iTRSF
# iCRIT <- ErrorCrit(InputsCrit = iInputsCrit, OutputsModel = SIM$OutputsModel, FUN_CRIT = get(iCRIT), verbose = FALSE)
# iCRIT <- iCRIT[c("CritName", "CritValue")]
# return(iCRIT)
# })
# return(Qtransfo)
# })
# CRIT <- as.data.frame(matrix(na.omit(unlist(CRIT)), ncol = 2, byrow = TRUE), stringsAsFactors = FALSE)
# colnames(CRIT) <- c("Criterion", "Value")
# rownames(CRIT) <- NULL
# CRIT$Value <- as.numeric(CRIT$Value)
# CRIT$Criterion <- gsub("\\[", " [", CRIT$Criterion)
## Recording past simulations
.GlobalEnv$.ShinyGR.hist[[length(.GlobalEnv$.ShinyGR.hist)+1]] <- list(Qsim = SIM$OutputsModel$Qsim,
Param = PARAM,
......@@ -250,20 +232,6 @@ shinyServer(function(input, output, session) {
WupPer = substr(getPrep()$WUPPER, 1, 10),
SimPer = substr(c(input$Period[1], input$Period[2]), 1, 10),
verbose = FALSE)
# CRITold <- lapply(CRIT_opt$Crit, function(iCRIT) {
# SIM_transfo <- lapply(CRIT_opt$Transfo, function(iTRSF) {
# iTRSF <- gsub("NO", "", iTRSF)
# SIMold$OptionsCrit$transfo <- iTRSF
# iCRITold <- ErrorCrit(InputsCrit = SIMold$OptionsCrit, OutputsModel = SIMold$OutputsModel, FUN_CRIT = get(iCRIT), verbose = FALSE)
# iCRITold <- iCRITold[c("CritName", "CritValue")]
# return(iCRITold)
# })
# })
# CRITold <- as.data.frame(matrix(na.omit(unlist(CRITold)), ncol = 2, byrow = TRUE), stringsAsFactors = FALSE)
# colnames(CRITold) <- c("Criterion", "Value")
# rownames(CRITold) <- NULL
# CRITold$Value <- as.numeric(CRITold$Value)
# CRITold$Criterion <- gsub("\\[", " [", CRITold$Criterion)
if (!getPrep()$isUngauged) {
InputsCritMultiold <- CreateInputsCrit(FUN_CRIT = CRIT_opt$Crit,
InputsModel = OBSold$InputsModel,
......
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