Commit 7401ed7a authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v0.2.10.107 refactor(server): change the way to extract a subset of an...

v0.2.10.107 refactor(server): change the way to extract a subset of an OutputsModel object in order to prevent the use of the [.OutputsModel method
Refs #36
parent 09d61e64
Pipeline #19318 canceled with stages
Package: airGRteaching
Type: Package
Title: Teaching Hydrological Modelling with the GR Rainfall-Runoff Models ('Shiny' Interface Included)
Version: 0.2.10.106
Date: 2021-01-12
Version: 0.2.10.107
Date: 2021-01-18
Authors@R: c(
person("Olivier", "Delaigue", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7668-8468"), email = "airGR@inrae.fr"),
person("Laurent", "Coron", role = c("aut"), comment = c(ORCID = "0000-0002-1503-6204")),
......
......@@ -4,7 +4,7 @@
### 0.2.10.106 Release Notes (2021-01-12)
### 0.2.10.107 Release Notes (2021-01-18)
#### New features
......
......@@ -376,7 +376,9 @@ shinyServer(function(input, output, session) {
getData <- reactive({
OutputsModel <- getSim()$SIM$OutputsModel
IndPlot <- which(OutputsModel$DatesR >= input$Period[1L] & OutputsModel$DatesR <= input$Period[2L])
OutputsModel2 <- sapply(OutputsModel[seq_len(which(names(OutputsModel) == "Qsim"))], function(x) x[IndPlot])
namesOutputsModel2Selec <- names(OutputsModel)[seq_len(which(names(OutputsModel) == "Qsim"))]
OutputsModel2 <- sapply(OutputsModel[namesOutputsModel2Selec], function(x) x[IndPlot])
# OutputsModel2 <- OutputsModel[IndPlot] ### using S3method('[', OutputsModel)
OutputsModel2 <- c(OutputsModel2, Qobs = list(getSim()$SIM$Qobs[IndPlot]))
if (length(OutputsModel2$DatesR) != 0) {
......
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