Commit 2fcb24d5 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

fix(GUI): automatically use the first column of ObsDF to get the dates

Refs #38
parent ade55f59
Pipeline #23774 passed with stage
in 6 minutes and 15 seconds
......@@ -21,7 +21,6 @@ ShinyGR <- function(ObsDF = NULL, DatesR = NULL, Precip = NULL, PotEvap = NULL,
}
}
if (is.data.frame(ObsDF)) {
colnames(ObsDF)[1L] <- "DatesR"
ObsDF <- list(ObsDF)
}
......
......@@ -22,7 +22,7 @@ shinyServer(function(input, output, session) {
if (is.null(.ShinyGR.args$ObsDF[[input$Dataset]])) {
datesDataset <- .ShinyGR.args$DatesR[1:2]
} else{
datesDataset <- .ShinyGR.args$ObsDF[[input$Dataset]]$DatesR[1:2]
datesDataset <- .ShinyGR.args$ObsDF[[input$Dataset]][[1]][1:2]
}
nbDaysDataset <- as.numeric(diff(datesDataset), units = "days")
if (nbDaysDataset %in% 29:31) {
......@@ -60,7 +60,7 @@ shinyServer(function(input, output, session) {
if (is.null(ObsDF)) {
datesDataset <- .ShinyGR.args$DatesR[1:2]
} else{
datesDataset <- .ShinyGR.args$ObsDF[[input$Dataset]]$DatesR[1:2]
datesDataset <- .ShinyGR.args$ObsDF[[input$Dataset]][[1]][1:2]
}
nbDaysDataset <- as.numeric(diff(datesDataset), units = "days")
if (nbDaysDataset %in% 29:31) {
......
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