mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 20:47:29 +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
|
|
@ -10,7 +10,7 @@
|
|||
#### 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(
|
||||
vlaue = "acc_cor",
|
||||
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(
|
||||
inputId = "cor_cutoff",
|
||||
label = "Correlation cut-off",
|
||||
min = 0,
|
||||
max = 1,
|
||||
step = .02,
|
||||
value = .7,
|
||||
value = .8,
|
||||
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({
|
||||
shiny::req(rv$list$table1)
|
||||
|
|
@ -4896,12 +4913,18 @@ server <- function(input, output, session) {
|
|||
gt::tab_header(gt::md("**Table 1: Baseline Characteristics**"))
|
||||
})
|
||||
|
||||
|
||||
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))
|
||||
|
||||
|
||||
|
||||
##############################################################################
|
||||
#########
|
||||
######### Regression model analyses
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue