Newer
Older

thierrychambert
committed
} # if "run
} # end function print_out
# Display result (text for non cumulated impacts)
output$impact_text <- renderText({
if(input$run == 0){
}else{
if(!param$cumulated_impacts){
print_out()
} else{
NULL
}
# Display result (table for cumulated impacts)
output$impact_table <- renderTable({
if(input$run == 0){
NULL
}else{
if(param$cumulated_impacts){
print_out()
} else{
NULL
}
}
}, rownames = TRUE)
##-------------------------------------------
## Plot Impacts
##-------------------------------------------
## Function to plot the impact
plot_out_impact <- function(){
if(is.null(out$run)) {} else {plot_impact(N = out$run$N, xlab = "year", ylab = "pop size")}
}
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
output$title_impact_plot <- renderText({
if(input$run > 0){
"Rsultat : Impact relatif au cours du temps"
}
})
output$impact_plot <- renderPlot({
plot_out_impact()
})
##-------------------------------------------
## Plot Demographic Trajectories
##-------------------------------------------
# Function to plot trajectories
plot_out_traj <- function(){
if(is.null(out$run)) {} else {plot_traj(N = out$run$N, xlab = "year", ylab = "pop size")}
}
output$graph_traj <- renderPlot({
plot_out_traj()
})
#####
###################################################################################