Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CSIRO-INRA
landsepi
Commits
e4beeef6
Commit
e4beeef6
authored
Jan 20, 2021
by
Jean-Francois Rey
☕
Browse files
Revert "Revert "bugfix compare number prop""
This reverts commit
b7ee6904
parent
b7ee6904
Changes
1
Hide whitespace changes
Inline
Side-by-side
inst/shiny-landsepi/server.R
View file @
e4beeef6
...
...
@@ -20,17 +20,17 @@ server <- function(input, output, session) {
# Test if the cultivars proportion sum is 1
ProportionValidation
<-
function
()
{
if
(
input
$
demo
==
"RO"
)
{
sum
<-
sum
_prop
<-
((
input
$
prop0
+
input
$
prop1
)
+
(
input
$
prop0
+
input
$
prop2
))
/
2
}
else
{
sum
<-
input
$
prop0
+
input
$
prop1
+
input
$
prop2
sum
_prop
<-
input
$
prop0
+
input
$
prop1
+
input
$
prop2
}
shinyjs
::
enable
(
id
=
"generateLandscape"
)
shiny
::
removeUI
(
selector
=
"#propError"
)
if
(
sum
!=
1
||
is.na
(
sum
))
{
if
(
!
isTRUE
(
all.equal
(
sum_prop
,
1
))
||
is.na
(
sum
_prop
))
{
shiny
::
insertUI
(
selector
=
"#generateLandscape"
,
where
=
"afterEnd"
,
...
...
Write
Preview
Supports
Markdown
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