# Module UI
#' @title mod_accords_vin_ui and mod_accords_vin_server
#' @description A shiny Module.
#'
#' @param id shiny id
#' @param input internal
#' @param output internal
#' @param session internal
#'
#' @rdname mod_accords_vin
#'
#' @keywords internal
#' @export
#' @importFrom shiny NS tagList
mod_accords_vin_ui <- function(id){
ns <- NS(id)
tagList(
selectInput(
ns("vin"),
"Choisir un vin :",
lt_vin
),
dataTableOutput(ns("accords_vin"))
)
}
# Module Server
#' @rdname mod_accords_vin
#' @export
#' @keywords internal
mod_accords_vin_server <- function(input, output, session){
ns <- session$ns
output$accords_vin <- renderDataTable({
accords %>%
dplyr::filter(vin == input$vin) %>%
dplyr::select(mets)
})
}
## To be copied in the UI
# mod_accords_vin_ui("accords_vin_ui_1")
## To be copied in the server
# callModule(mod_accords_vin_server, "accords_vin_ui_1")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.