Created
October 6, 2021 21:01
-
-
Save rpodcast/4f9ca4fecfd8e70f420d4bdb4c8cdecd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Module UI | |
#' @title mod_explore_ui and mod_explore_server | |
#' @description A shiny Module. | |
#' | |
#' @param id shiny id | |
#' @param input internal | |
#' @param output internal | |
#' @param session internal | |
#' | |
#' @rdname mod_explore | |
#' | |
#' @keywords internal | |
#' @export | |
#' @importFrom shiny NS tagList | |
#' @import datadigest | |
mod_explore_ui <- function(id){ | |
ns <- NS(id) | |
tagList( | |
fluidRow( | |
col_12( | |
datadigest::codebookOutput(ns("data_explore"), width = "100%") | |
) | |
) | |
) | |
} | |
# Module Server | |
#' @rdname mod_explore | |
#' @export | |
#' @keywords internal | |
mod_explore_server <- function(input, output, session, current_tab, current_data){ | |
ns <- session$ns | |
output$data_explore <- datadigest::renderCodebook({ | |
req(current_data()) | |
datadigest::codebook(current_data()) | |
}) | |
} | |
## To be copied in the UI | |
# mod_explore_ui("explore_ui_1") | |
## To be copied in the server | |
# callModule(mod_explore_server, "explore_ui_1") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment