R/elements_ui.R

Defines functions categorical_model_covariate_element_ui numeric_model_covariate_element_ui group_filter_element_ui numeric_filter_element_ui

Documented in categorical_model_covariate_element_ui group_filter_element_ui numeric_filter_element_ui numeric_model_covariate_element_ui

# used in cohort selection ----------------------------------------------------

#' Numeric Filter Element UI
#'
#' @param id A shiny ID
#'
#' @export
numeric_filter_element_ui <- function(id){
    ns <- shiny::NS(id)
    shiny::tagList(
        shiny::uiOutput(ns("select_ui")),
        shiny::uiOutput(ns("slider_ui"))
    )
}

#' Group Filter Element UI
#'
#' @param id A shiny ID
#'
#' @export
group_filter_element_ui <- function(id){
    ns <- shiny::NS(id)
    shiny::tagList(
        shiny::uiOutput(ns("select_ui")),
        shiny::uiOutput(ns("checkbox_ui")),
        shiny::checkboxInput(ns('selectAll'), 'Select/Deselect All')
    )
}

# used in driver module -------------------------------------------------------

#' Numerical Model Covariate Element UI
#'
#' @param id A shiny ID
#'
#' @export
numeric_model_covariate_element_ui <- function(id){
    ns <- shiny::NS(id)
    shiny::tagList(
        shiny::uiOutput(ns("select_covariate_ui")),
        shiny::uiOutput(ns("select_transformation_ui"))
    )
}

#' Categorical Model Covariate Element UI
#'
#' @param id A shiny ID
#'
#' @export
categorical_model_covariate_element_ui <- function(id){
    ns <- shiny::NS(id)
    shiny::tagList(
        shiny::uiOutput(ns("select_covariate_ui"))
    )
}
CRI-iAtlas/iatlas.modules2 documentation built on Dec. 19, 2024, 8:14 p.m.