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