05 September 2014

shinyTree: jsTree + shiny

We’re happy to announce the release of our latest R package, shinyTree. shinyTree is an integration of the jsTree library with the Shiny interactive web framework for R, which makes it simple for R developers to create web applications without knowing anything about HTML or JavaScript.

You can view a live demo of one application here.

shinyTree offers Shiny developers a way to create interactive trees that can be selected and interactively expanded/collapsed with convenient ways to access the user’s current selections and any other property about how the tree is currently presented. You can view more details or download the source code from the GitHub page; if you encounter any problems or feature requests, feel free to open a ticket there.

To get started with the package, you’ll need to installed it from GitHub, as it’s not yet available on CRAN. The easiest way to do this is using the devtools package which you should install if you haven’t already:


Now you’re ready to install shinyTree and load up one of the examples:

# Load shiny (I'm assuming it's already installed)

# Run one of the included examples in the shinyTree package.
runApp(system.file("examples/04-selected", package="shinyTree"))

We’re considering features like client-side drag-and-drop support within the trees as well as adding search capabilities to trees; let us know in the comments on or GitHub what you’d be most interested in using with your projects. We’re also interested in ways to make this package more performant.