#' data_processing UI Function
#'
#' @description A shiny Module.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
#' @noRd
#'
#' @importFrom shiny NS tagList
#' @importFrom dplyr %>%
mod_data_processing_ui <- function(id){
ns <- NS(id)
tagList(
)
}
#' data_processing Server Function
#'
#' @noRd
mod_data_processing_server <- function(id, r){
moduleServer(id, function(input, output, session){
ns <- session$ns
plot_data <- reactive({
req(r$plot_data_orig)
data <- r$plot_data_orig
if(!is.null(input$code_as_na)){
data <- data %>% purrr::map_df(function(.x) {
.x[.x %in% input$code_as_na] <- NA
.x
})
}
if(!is.null(input$drop_na)){
if(input$drop_na){
data <- data %>% dplyr::filter(complete.cases(.))
}
}
if(!is.null(input$na_label)){
data[is.na(data)] <- input$na_label
}
data
})
observe({
r$plot_data <- plot_data()
})
})
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.