Skip to content

Instantly share code, notes, and snippets.

View savemark's full-sized avatar

Christian Savemark savemark

  • Stockholm, Sweden
View GitHub Profile
@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")),
@stla
stla / DT_childTables.R
Last active January 9, 2023 15:12
Child tables for DT (R package)
library(DT)
## data
dat <- data.frame(
Sr = c(1.5, 2.3),
Description = c("A - B", "X - Y")
)
## details of row 1
subdat1 <- data.frame(
Chromosome = "chr18",