We need to create a hierarchical drop-down list in R shiny. The list will have at least 3 levels. Could you please help me in identifying the correct library for this? Please refer the below pic for your reference.Currently we are using the below code.But we are getting incorrect columns in the drop-down.
ui.R
library(shiny)
library(shinydashboard)
library(shinyTree)
shinyUI(
shiny::fluidPage(
h3('Countries '),
shinyTree("tree", checkbox = TRUE),
verbatimTextOutput("x")
)
)
server.R
library(shiny)
library(shinydashboard)
library(shinyTree)
library(treemap)
data(GNI2014)
head(GNI2014)
GNI2014$pathString <- paste("world",
GNI2014$continent,
GNI2014$country,
sep = "/")
population <- as.Node(GNI2014)
GL<-as.list(population)
shinyServer(function(input, output, session) {
output$tree <- renderTree({GL })
output$x<-renderPrint({input$tree})
})