From bf51489c7b4592f6abefaa0c45b3df5d2565b8b3 Mon Sep 17 00:00:00 2001 From: Floris Date: Thu, 28 Sep 2023 14:39:18 +0200 Subject: [PATCH 1/2] Added oneliner comments on every tab + explanation on export files --- inst/shiny/GUI/ui.R | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/inst/shiny/GUI/ui.R b/inst/shiny/GUI/ui.R index 160894c..4b2c982 100644 --- a/inst/shiny/GUI/ui.R +++ b/inst/shiny/GUI/ui.R @@ -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 @@ -58,6 +60,8 @@ 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") @@ -131,6 +135,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") @@ -154,6 +160,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") @@ -173,6 +181,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(""), # buttons to generate/downlaod files and inputs for table options uiOutput("select_file_type_table"), uiOutput("options_table"), @@ -200,6 +218,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), From ef7089e7dd0b3fd2185823eabbbd6bdc1a4f66f7 Mon Sep 17 00:00:00 2001 From: Floris Date: Sun, 1 Oct 2023 15:33:00 +0200 Subject: [PATCH 2/2] Added UI element with serial mediator order in case of serial model --- inst/shiny/GUI/server.R | 11 +++++++++++ inst/shiny/GUI/ui.R | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/inst/shiny/GUI/server.R b/inst/shiny/GUI/server.R index 067d445..2ab8ddb 100644 --- a/inst/shiny/GUI/server.R +++ b/inst/shiny/GUI/server.R @@ -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", + seq_along(input$m), + ": ", + 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), { diff --git a/inst/shiny/GUI/ui.R b/inst/shiny/GUI/ui.R index 4b2c982..3c138a1 100644 --- a/inst/shiny/GUI/ui.R +++ b/inst/shiny/GUI/ui.R @@ -64,7 +64,9 @@ shinyUI(fluidPage( 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(