Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added oneliner comments on every tab + explanation on export files #30

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions inst/shiny/GUI/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,17 @@ shinyServer(function(input, output, session) {
multiple = FALSE)
})

# create UI element for the order of mediators in case of the serial model
output$mediator_order <- renderUI({
req(input$model == "serial")
mediator_string <- toString(paste(
"M<sub>",
seq_along(input$m),
"</sub>: ",
input$m, sep = ""))
HTML("The order of mediators will be: ", mediator_string)
})

# observer to clean up reactive values when variables are selected
# (which is used to clear output)
observeEvent(c(input$y, input$x, input$m, input$covariates), {
Expand Down
23 changes: 22 additions & 1 deletion inst/shiny/GUI/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ shinyUI(fluidPage(
sidebarLayout(
# input panel on left hand side
sidebarPanel(
# header for the data selection sidebarpanel
h3("Import your data"),
# input for selecting a data source
uiOutput("select_data_source"),
# input for selecting a data frame from the global environment
Expand All @@ -58,9 +60,13 @@ shinyUI(fluidPage(
sidebarLayout(
# input panel on left hand side
sidebarPanel(
# header for the model specification sidebarpanel
h3("Choose your variables"),
# inputs for variables and type of mediation model
uiOutput("select_variables"),
uiOutput("select_model")
uiOutput("select_model"),
# output for order of mediator variables in case of serial model
uiOutput("mediator_order")
),
# output panel on right hand side
mainPanel(
Expand Down Expand Up @@ -131,6 +137,8 @@ shinyUI(fluidPage(
sidebarLayout(
# input panel on left hand side
sidebarPanel(
# header for the ROBMED sidebarpanel
h3("Run Robust Mediation Analysis"),
# inputs for various options
uiOutput("options_ROBMED"),
uiOutput("advanced_options_ROBMED")
Expand All @@ -154,6 +162,8 @@ shinyUI(fluidPage(
sidebarLayout(
# input panel on left hand side
sidebarPanel(
# header for the OLS Bootstrap sidebarpanel
h3("Run Mediation Analysis using OLS Bootstrap test"),
# inputs for various options
uiOutput("options_OLS_boot"),
uiOutput("advanced_options_OLS_boot")
Expand All @@ -173,6 +183,16 @@ shinyUI(fluidPage(
sidebarLayout(
# input panel on left hand side
sidebarPanel(
# header for the export sidebarpanel
h3("Export your results"),
# information on export files
h5("Results will be exported as a .zip file containing:"),
HTML("<ul>
<li> Plots of the results in the chosen filetypes (.png, .pdf) </li>
<li> Tables of the results in the chosen filetypes (.docx, .ppt) </li>
<li> Script used to generate the results as a .R file </li>
<li> Data used for the tests as a .RData file </li>
</ul>"),
# buttons to generate/downlaod files and inputs for table options
uiOutput("select_file_type_table"),
uiOutput("options_table"),
Expand Down Expand Up @@ -200,6 +220,7 @@ shinyUI(fluidPage(
sidebarLayout(
# input panel on left hand side
sidebarPanel(
h3("Download references"),
selectInput("citation_format", "Citation format",
choices = c("EndNote", "BibTeX"),
selected = "EndNote", multiple = FALSE),
Expand Down