Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
HYCAR-Hydro
airGRteaching
Commits
2fcb24d5
Commit
2fcb24d5
authored
Jun 04, 2021
by
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
Changes
2
Pipelines
4
Hide whitespace changes
Inline
Side-by-side
R/ShinyGR.R
View file @
2fcb24d5
...
...
@@ -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
)
}
...
...
inst/ShinyGR/server.R
View file @
2fcb24d5
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment