Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Impact démographique des collisions aviaires avec les éoliennes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CEFE
Interactions Humains-Animaux
Impact démographique des collisions aviaires avec les éoliennes
Commits
9f9339d7
Commit
9f9339d7
authored
3 years ago
by
thierrychambert
Browse files
Options
Downloads
Patches
Plain Diff
Cleaned "param" reactive values and thier use in run_simul
This version of the Shiny App works great !
parent
55c7dae6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
inst/ShinyApp/runApp.R
+0
-1
0 additions, 1 deletion
inst/ShinyApp/runApp.R
inst/ShinyApp/server.R
+48
-16
48 additions, 16 deletions
inst/ShinyApp/server.R
with
48 additions
and
17 deletions
inst/ShinyApp/runApp.R
+
0
−
1
View file @
9f9339d7
library
(
eolpop
)
source
(
"./inst/ShinyApp/ui.R"
)
source
(
"./inst/ShinyApp/server.R"
)
...
...
This diff is collapsed.
Click to expand it.
inst/ShinyApp/server.R
+
48
−
16
View file @
9f9339d7
...
...
@@ -134,30 +134,62 @@ server <- function(input, output, session){
## Reactive value : simulation inputs --
##--------------------------------------------
param
<-
reactiveValues
(
N1
=
NULL
,
nsim
=
NULL
,
cumulated_impacts
=
NULL
,
fatalities_mean
=
NULL
,
fatalities_se
=
NULL
,
onset_time
=
NULL
,
onset_year
=
NULL
,
pop_size_mean
=
NULL
,
pop_size_se
=
NULL
,
pop_size_type
=
NULL
,
pop_growth_mean
=
NULL
,
pop_growth_se
=
NULL
,
fecundities
=
NULL
,
survivals
=
NULL
,
s_calibrated
=
NULL
,
f_calibrated
=
NULL
,
vr_calibrated
=
NULL
,
cumulated_impacts
=
NULL
,
onset_time
=
NULL
,
onset_year
=
NULL
,
carrying_capacity
=
NULL
,
theta
=
NULL
,
rMAX_species
=
NULL
,
theta
=
theta
,
model_demo
=
NULL
,
time_horzion
=
NULL
,
coeff_var_environ
=
NULL
,
fatal_constant
=
NULL
,
fatalities_eli_result
=
NULL
,
pop_size_eli_result
=
NULL
,
pop_size_mean
=
NULL
,
pop_size_se
=
NULL
,
pop_size_type
=
NULL
,
pop_growth_eli_result
=
NULL
,
pop_growth_mean
=
NULL
,
pop_growth_se
=
NULL
,
carrying_cap_eli_result
=
NULL
)
carrying_cap_eli_result
=
NULL
)
###~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~###
##----------------------------------------------------------
## Observe parameter values to be used in simulations run --
##----------------------------------------------------------
observe
({
param
# required to ensure up-to-date values are run
# simple inputs
param
$
nsim
<-
input
$
nsim
param
$
fatal_constant
<-
input
$
fatal_constant
# fixed in global environment (for now)
param
$
theta
=
theta
param
$
time_horzion
=
time_horzion
param
$
coeff_var_environ
=
coeff_var_environ
})
# end observe
###~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~###
observe
(
param
)
##--------------------------------------------
## Display parameter distribution --
...
...
@@ -451,7 +483,7 @@ server <- function(input, output, session){
withProgress
(
message
=
'Simulation progress'
,
value
=
0
,
{
param
$
N1
<-
run_simul_shiny
(
nsim
=
input
$
nsim
,
param
$
N1
<-
run_simul_shiny
(
nsim
=
param
$
nsim
,
cumulated_impacts
=
param
$
cumulated_impacts
,
fatalities_mean
=
param
$
fatalities_mean
,
...
...
@@ -469,13 +501,13 @@ server <- function(input, output, session){
fecundities
=
param
$
f_calibrated
,
carrying_capacity
=
param
$
carrying_capacity
,
theta
=
theta
,
theta
=
param
$
theta
,
rMAX_species
=
param
$
rMAX_species
,
model_demo
=
NULL
,
time_horzion
=
time_horzion
,
coeff_var_environ
=
coeff_var_environ
,
fatal_constant
=
input
$
fatal_constant
)
time_horzion
=
param
$
time_horzion
,
coeff_var_environ
=
param
$
coeff_var_environ
,
fatal_constant
=
param
$
fatal_constant
)
})
# Close withProgress
})
# Close observEvent
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment