mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2025-09-12 09:59:39 +02:00
minor adjustments to corelation plotting
This commit is contained in:
parent
4050429375
commit
262a1316b0
5 changed files with 55 additions and 9 deletions
|
@ -1 +1 @@
|
||||||
app_version <- function()'250207_1622'
|
app_version <- function()'250207_1709'
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#### Current file: R//app_version.R
|
#### Current file: R//app_version.R
|
||||||
########
|
########
|
||||||
|
|
||||||
app_version <- function()'250207_1622'
|
app_version <- function()'250207_1709'
|
||||||
|
|
||||||
|
|
||||||
########
|
########
|
||||||
|
@ -4103,14 +4103,19 @@ ui_elements <- list(
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
bslib::accordion_panel(
|
bslib::accordion_panel(
|
||||||
|
vlaue = "acc_cor",
|
||||||
title = "Correlations",
|
title = "Correlations",
|
||||||
|
icon = bsicons::bs_icon("table"),
|
||||||
|
shiny::uiOutput("outcome_var_cor"),
|
||||||
|
shiny::helpText("This variable will be excluded from the correlation plot."),
|
||||||
|
shiny::br(),
|
||||||
shiny::sliderInput(
|
shiny::sliderInput(
|
||||||
inputId = "cor_cutoff",
|
inputId = "cor_cutoff",
|
||||||
label = "Correlation cut-off",
|
label = "Correlation cut-off",
|
||||||
min = 0,
|
min = 0,
|
||||||
max = 1,
|
max = 1,
|
||||||
step = .02,
|
step = .02,
|
||||||
value = .7,
|
value = .8,
|
||||||
ticks = FALSE
|
ticks = FALSE
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -4887,6 +4892,18 @@ server <- function(input, output, session) {
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
output$outcome_var_cor <- shiny::renderUI({
|
||||||
|
shiny::selectInput(
|
||||||
|
inputId = "outcome_var_cor",
|
||||||
|
selected = NULL,
|
||||||
|
label = "Select outcome variable",
|
||||||
|
choices = c(
|
||||||
|
colnames(rv$list$data)
|
||||||
|
# ,"none"
|
||||||
|
),
|
||||||
|
multiple = FALSE
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
output$table1 <- gt::render_gt({
|
output$table1 <- gt::render_gt({
|
||||||
shiny::req(rv$list$table1)
|
shiny::req(rv$list$table1)
|
||||||
|
@ -4896,12 +4913,18 @@ server <- function(input, output, session) {
|
||||||
gt::tab_header(gt::md("**Table 1: Baseline Characteristics**"))
|
gt::tab_header(gt::md("**Table 1: Baseline Characteristics**"))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
data_correlations_server(id = "correlations",
|
data_correlations_server(id = "correlations",
|
||||||
data = shiny::reactive(rv$list$data),
|
data = shiny::reactive({
|
||||||
|
out <- dplyr::select(rv$list$data,-!!input$outcome_var_cor)
|
||||||
|
# input$outcome_var_cor=="none"){
|
||||||
|
# out <- rv$list$data
|
||||||
|
# }
|
||||||
|
out
|
||||||
|
}),
|
||||||
cutoff = shiny::reactive(input$cor_cutoff))
|
cutoff = shiny::reactive(input$cor_cutoff))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#########
|
#########
|
||||||
######### Regression model analyses
|
######### Regression model analyses
|
||||||
|
|
|
@ -5,6 +5,6 @@ account: agdamsbo
|
||||||
server: shinyapps.io
|
server: shinyapps.io
|
||||||
hostUrl: https://api.shinyapps.io/v1
|
hostUrl: https://api.shinyapps.io/v1
|
||||||
appId: 13611288
|
appId: 13611288
|
||||||
bundleId:
|
bundleId: 9765526
|
||||||
url: https://agdamsbo.shinyapps.io/freesearcheR/
|
url: https://agdamsbo.shinyapps.io/freesearcheR/
|
||||||
version: 1
|
version: 1
|
||||||
|
|
|
@ -512,6 +512,18 @@ server <- function(input, output, session) {
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
output$outcome_var_cor <- shiny::renderUI({
|
||||||
|
shiny::selectInput(
|
||||||
|
inputId = "outcome_var_cor",
|
||||||
|
selected = NULL,
|
||||||
|
label = "Select outcome variable",
|
||||||
|
choices = c(
|
||||||
|
colnames(rv$list$data)
|
||||||
|
# ,"none"
|
||||||
|
),
|
||||||
|
multiple = FALSE
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
output$table1 <- gt::render_gt({
|
output$table1 <- gt::render_gt({
|
||||||
shiny::req(rv$list$table1)
|
shiny::req(rv$list$table1)
|
||||||
|
@ -521,12 +533,18 @@ server <- function(input, output, session) {
|
||||||
gt::tab_header(gt::md("**Table 1: Baseline Characteristics**"))
|
gt::tab_header(gt::md("**Table 1: Baseline Characteristics**"))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
data_correlations_server(id = "correlations",
|
data_correlations_server(id = "correlations",
|
||||||
data = shiny::reactive(rv$list$data),
|
data = shiny::reactive({
|
||||||
|
out <- dplyr::select(rv$list$data,-!!input$outcome_var_cor)
|
||||||
|
# input$outcome_var_cor=="none"){
|
||||||
|
# out <- rv$list$data
|
||||||
|
# }
|
||||||
|
out
|
||||||
|
}),
|
||||||
cutoff = shiny::reactive(input$cor_cutoff))
|
cutoff = shiny::reactive(input$cor_cutoff))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#########
|
#########
|
||||||
######### Regression model analyses
|
######### Regression model analyses
|
||||||
|
|
|
@ -317,14 +317,19 @@ ui_elements <- list(
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
bslib::accordion_panel(
|
bslib::accordion_panel(
|
||||||
|
vlaue = "acc_cor",
|
||||||
title = "Correlations",
|
title = "Correlations",
|
||||||
|
icon = bsicons::bs_icon("table"),
|
||||||
|
shiny::uiOutput("outcome_var_cor"),
|
||||||
|
shiny::helpText("This variable will be excluded from the correlation plot."),
|
||||||
|
shiny::br(),
|
||||||
shiny::sliderInput(
|
shiny::sliderInput(
|
||||||
inputId = "cor_cutoff",
|
inputId = "cor_cutoff",
|
||||||
label = "Correlation cut-off",
|
label = "Correlation cut-off",
|
||||||
min = 0,
|
min = 0,
|
||||||
max = 1,
|
max = 1,
|
||||||
step = .02,
|
step = .02,
|
||||||
value = .7,
|
value = .8,
|
||||||
ticks = FALSE
|
ticks = FALSE
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue