Skip to content

Instantly share code, notes, and snippets.

@tbadams45
tbadams45 / uiOutput-in-modules.R
Last active June 28, 2023 18:25
How to use renderUI in shiny modules. Main takeaway: session$ns("id"). This works in nested modules, too. See the section on session$ns in the documentation for more information: http://shiny.rstudio.com/reference/shiny/latest/session.html
library(shiny)
library(dplyr)
library(ggplot2)
innerModUI <- function(id) {
ns <- NS(id)
fluidPage(fluidRow(
uiOutput(ns("inner_slider")),
@tbadams45
tbadams45 / app.R
Created August 4, 2016 21:14
Using conditionalPanel inside of Shiny Modules
testUI <- function(id, label = "CSV file") {
# Create a namespace function using the provided id
ns <- NS(id)
tagList(
selectizeInput(
ns('mySelect'), 'Test Select', choices = state.name,
options = list(
placeholder = 'Please select an option below',
@tbadams45
tbadams45 / .block
Last active February 22, 2018 14:47
Radial Network in D3
scrolling: yes