Skip to content

Instantly share code, notes, and snippets.

@strboul
strboul / shiny-dynamic-actionbuttons.R
Created June 5, 2019 18:29
Shiny dynamically create actionButtons #observeEvent #renderUI #uiOutput
# UTILS -------------------------------------------------------------------
#' Generate input IDs for Shiny for dynamically generated elements
#'
#' @param prefix a meaningful text for the element e.g. button, table, slider etc.
#' @param id increase iteration from e.g. a loop.
#' @noRd
shinyInputId <- function(prefix, id) {
paste(prefix, id, sep = "_")