Skip to content

Instantly share code, notes, and snippets.

@trafficonese
Created April 18, 2019 07:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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