Skip to content

Instantly share code, notes, and snippets.

@trafficonese
Created April 18, 2019 07:01
Show Gist options
  • Save trafficonese/279d242fe83a6bbafa7f1c66644b277d to your computer and use it in GitHub Desktop.
Save trafficonese/279d242fe83a6bbafa7f1c66644b277d to your computer and use it in GitHub Desktop.
shinyTrees
library(shiny)
library(shinyTree)
ui <- fluidPage(
shinyTree("tree"),
hr(),
shinyTree("tree1")
)
server <- function(input, output, session) {
output$tree <- renderTree({
list(
a3=structure(list(
a2=structure(list(
a1=structure(list(""), stopened=TRUE)),
stopened=TRUE)),
stopened=TRUE))
})
output$tree1 <- renderTree({
list(
a3=list(
a2=list(
a1=structure(list(""), stopened=TRUE))
)
)
})
}
shinyApp(ui, server)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment