Skip to content

Commit 812f2cf

Browse files
add meta tab
1 parent 97241b1 commit 812f2cf

1 file changed

Lines changed: 75 additions & 75 deletions

File tree

‎modals.R‎

Lines changed: 75 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ createGettingStartedModal <- function() {
1717
tags$li("Test type"),
1818
tags$li("Correlations (if applicable)"),
1919
tags$li("Motion Method"),
20-
tags$li("Pooling Method"),
20+
tags$li("Pooling"),
2121
),
2222
tags$p("Refer to the",tags$b(tags$i("tips")),"next to each input for additional guidance!"),
2323
tags$div(style = "text-align: center;",
@@ -29,7 +29,7 @@ createGettingStartedModal <- function() {
2929

3030
# Modal 2: Understanding the Plots
3131

32-
createUnderstandingPlotsModal1 <- function() {
32+
createUnderstandingPlotsModal <- function() {
3333
bsModal(
3434
id = "instructionsModal2", title = "Understanding the Plots", trigger = NULL,
3535
size = "large",
@@ -41,6 +41,11 @@ createUnderstandingPlotsModal1 <- function() {
4141
tags$li(tags$i("Red")," indicates simultaneous CIs overlapping with 0,", tags$i("green"), "indicates no overlap."),
4242
tags$li(tags$i("Multivariate Effect sizes")," are displayed under the plots."),
4343
),
44+
tags$p(tags$b(tags$i("The plots on the right")),"show the effect maps spatially:"),
45+
tags$ul(
46+
tags$li("Effect size matrices show the effect sizes for each edge for functional connectivity studies. Networks are labelled on the axes."),
47+
tags$li("Activation Maps help you visualize the effect maps from activation studies on the brain.")
48+
),
4449
tags$div(style = "text-align: center;",
4550
actionButton("prevToPage1", "Previous", style = "margin-top: 10px; background-color: #337ab7; color: white; border: none; padding: 10px 20px; font-size: 16px;"),
4651
actionButton("nextToPage3", "Next", style = "margin-top: 10px; background-color: #337ab7; color: white; border: none; padding: 10px 20px; font-size: 16px;")
@@ -49,18 +54,20 @@ createUnderstandingPlotsModal1 <- function() {
4954
)
5055
}
5156

52-
# Modal 3: Understanding the Plots
57+
# Modal 3: Meta tab
5358

54-
createUnderstandingPlotsModal2 <- function() {
59+
createUnderstandingMetaAnalysisTab <- function() {
5560
bsModal(
56-
id = "instructionsModal3", title = "Understanding the Plots", trigger = NULL,
61+
id = "instructionsModal3", title = "Understanding the Meta-Analysis Tab", trigger = NULL,
5762
size = "large",
5863
tags$div(
59-
tags$p("Explore the expected effect sizes of the studies that match the provided filters."),
60-
tags$p(tags$b(tags$i("The plots on the right")),"show the effect maps spatially:"),
64+
tags$p("Results from meta-analyses of effect sizes across test types (r, t, t2) and categories (age, biometric, psychiatric, cognitive, sex) can be found on the Meta-Analysis tab."),
65+
tags$p("Simultaneous confidence interval plots are displayed to the left and spatial maps are displayed to the right."),
66+
tags$p("Use",tags$b(tags$i("the menu to the left")),"to filter the meta-analysis by:"),
6167
tags$ul(
62-
tags$li("Effect size matrices show the effect sizes for each edge for functional connectivity studies. Networks are labelled on the axes."),
63-
tags$li("Activation Maps help you visualize the effect maps from activation studies on the brain.")
68+
tags$li("What do you want to group by? (Statistic or Category)"),
69+
tags$li("Motion Method"),
70+
tags$li("Pooling "),
6471
),
6572
tags$div(style = "text-align: center;",
6673
actionButton("prevToPage2", "Previous", style = "margin-top: 10px; background-color: #337ab7; color: white; border: none; padding: 10px 20px; font-size: 16px;"),
@@ -101,74 +108,67 @@ createDynamicPanel <- function(input, study) {
101108
# Combine the reactive expression to update when either the Apply Filters or Reset Filters button is clicked
102109
renderUI({
103110
#event <- eventReactive(
104-
#list(input$apply_filters_btn, input$reset_btn), { # Trigger on either button click
105-
messages <- c()
106-
107-
# Dataset message
108-
if (is.null(input$dataset) || input$dataset == "*") {
109-
messages$dataset <- "• All datasets."
110-
} else {
111-
messages$dataset <- paste("• The <b>", input$dataset, "</b> dataset(s).")
112-
}
113-
114-
# Map type message
115-
if (is.null(input$map_type) || input$map_type == "*") {
116-
messages$map_type <- "• All map types."
117-
} else {
118-
messages$map_type <- paste("• <b>", input$map_type, "</b> map type.")
119-
}
120-
121-
# Task message
122-
if (is.null(input$task) || length(input$task) == 0) {
123-
messages$task <- "• No specific tasks are selected."
124-
} else if ("*" %in% input$task) {
125-
messages$task <- "• All tasks."
126-
} else {
127-
messages$task <- paste("• The <b>", paste(input$task, collapse = ", "), "</b> task(s).")
128-
}
129-
130-
# Test type message
131-
if (is.null(input$test_type) || input$test_type == "*") {
132-
messages$test_type <- "• All test types."
133-
} else {
134-
messages$test_type <- paste("• The <b>", input$test_type, "</b> test type(s).")
135-
}
136-
137-
# Correlation message
138-
# if (is.null(input$correlation) || length(input$correlation) == 0) {
139-
# messages$correlation <- "• No specific correlations are selected."
140-
# } else if (length(input$correlation) == length(unique(study[["var2"]])) || input$correlation == "*") {
141-
# messages$correlation <- "• All correlations"
142-
# } else {
143-
# messages$correlation <- paste("• The <b>", paste(input$correlation, collapse = ", "), "</b> correlation(s).")
144-
# }
145-
if (is.null(input$correlation) || length(input$correlation) == 0) {
146-
messages$correlation <- "• No specific correlations are selected."
147-
} else if (length(input$correlation) == length(unique(study[["var2"]])) || "*" %in% input$correlation) {
148-
messages$correlation <- "• All correlations"
149-
} else {
150-
messages$correlation <- paste("• The <b>", paste(input$correlation, collapse = ", "), "</b> correlation(s).")
151-
}
152-
153-
154-
# Group by message
155-
if (!is.null(input$group_by) && input$group_by != "none") {
156-
messages$group_by <- paste("• The results are grouped by <b>", input$group_by, "</b>.")
157-
}
158-
159-
# Combine the messages into one text
160-
message_text <- paste("<b>You are looking at:</b><br>", paste(messages, collapse = "<br>"))
161-
162-
tags$div(
163-
style = "background-color: #f8f9fa; padding: 10px; margin-bottom: 20px; border-radius: 5px; text-align: center;",
164-
tags$p(HTML(message_text))
165-
)
166-
}
167-
)
111+
#list(input$apply_filters_btn, input$reset_btn), { # Trigger on either button click
112+
messages <- c()
113+
114+
# Dataset message
115+
if (is.null(input$dataset) || input$dataset == "*") {
116+
messages$dataset <- "• All datasets."
117+
} else {
118+
messages$dataset <- paste("• The <b>", input$dataset, "</b> dataset(s).")
119+
}
168120

169-
# # Render the dynamic content based on the eventReactive output
170-
# event()
121+
# Map type message
122+
if (is.null(input$map_type) || input$map_type == "*") {
123+
messages$map_type <- "• All map types."
124+
} else {
125+
messages$map_type <- paste("• <b>", input$map_type, "</b> map type.")
126+
}
127+
128+
# Task message
129+
if (is.null(input$task) || length(input$task) == 0) {
130+
messages$task <- "• No specific tasks are selected."
131+
} else if ("*" %in% input$task) {
132+
messages$task <- "• All tasks."
133+
} else {
134+
messages$task <- paste("• The <b>", paste(input$task, collapse = ", "), "</b> task(s).")
135+
}
136+
137+
# Test type message
138+
if (is.null(input$test_type) || input$test_type == "*") {
139+
messages$test_type <- "• All test types."
140+
} else {
141+
messages$test_type <- paste("• The <b>", input$test_type, "</b> test type(s).")
142+
}
143+
144+
# Correlation message
145+
if (is.null(input$correlation) || length(input$correlation) == 0) {
146+
messages$correlation <- "• No specific correlations are selected."
147+
} else if (length(input$correlation) == length(unique(study[["var2"]])) || "*" %in% input$correlation) {
148+
messages$correlation <- "• All correlations"
149+
} else {
150+
messages$correlation <- paste("• The <b>", paste(input$correlation, collapse = ", "), "</b> correlation(s).")
151+
}
152+
153+
154+
# Group by message
155+
if (!is.null(input$group_by) && input$group_by != "none") {
156+
messages$group_by <- paste("• The results are grouped by <b>", input$group_by, "</b>.")
157+
}
158+
159+
# Combine the messages into one text
160+
message_text <- paste("<b>You are looking at:</b><br>", paste(messages, collapse = "<br>"))
161+
162+
tags$div(
163+
style = "background-color: #f8f9fa; padding: 10px; margin-bottom: 20px; border-radius: 5px; text-align: center;",
164+
tags$p(HTML(message_text))
165+
)
171166
}
167+
)
168+
169+
# # Render the dynamic content based on the eventReactive output
170+
# event()
171+
}
172172

173173
# Modal event observers for navigation
174174
createModalNavigationObservers <- function(input, session) {

0 commit comments

Comments
 (0)