forked from CRSU-Apps/MetaInsight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.R
48 lines (35 loc) · 1.46 KB
/
server.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
###### Bayesian V4 ######
#if packages not installed, please install them first by running the line below.
#install.packages(c("dplyr","metafor", "netmeta","shiny", "shinyAce","rmarkdown", "knitr", "gemtc", "plyr", data.table"
# , "shinyalert", "plotly"))
# the data for meta-regression is from: http://nicedsu.org.uk/wp-content/uploads/2016/03/TSD3-Heterogeneity.final-report.08.05.12.pdf
shinyServer(function(input, output, session) {
### GDPR
google_analytics_header_server(id = "analytics", app_name = "MetaInsight", google_analytics_id = "UA-135597033-7")
#####
# Reactive functions used in various places
#####
home_page_server(id = "home")
data_reactives <- load_data_page_server(id = 'load_data_page')
data <- data_reactives$data
is_default_data = data_reactives$is_default_data
treatment_df <- data_reactives$treatment_df
metaoutcome <- data_reactives$metaoutcome
data_analysis_page_server(
id = "data_analysis",
data = data,
is_default_data = is_default_data,
treatment_df = treatment_df,
metaoutcome = metaoutcome
)
user_guide_page_server(id = "user_guide")
# Reset the top bar to show the previously selected tab when the "Troubleshooting" tab is selected
top_bar_selection <- reactiveVal()
observe({
if (input$top_bar != "Troubleshooting") {
top_bar_selection(input$top_bar)
} else {
shiny::updateNavbarPage(inputId = "top_bar", selected = top_bar_selection())
}
})
})