Questions tagged [shinytree]

jsTree Bindings for Shiny

Exposes bindings to jsTree (a JavaScript library that supports interactive trees) to enable a rich, editable trees in Shiny.

30 questions
5
votes
1 answer

shinyTree: set variable to value if checkbox is checked

Follow-up to shinyTree: view without selecting. library(shiny) library(shinyTree) server <- shinyServer(function(input, output, session) { output$tree <- renderTree({ sss=list( 'I lorem impsum'= list( 'I.1 lorem impsum' = …
Clarinetist
  • 1,097
  • 18
  • 46
3
votes
1 answer

Fire JavaScript code once element is added

Let's assume I want to get the following jstree in shiny (the part with the button is just to illustrate that the shinytree is not present from the beginning): $(function() { $('#create').on('click', function() { $('#mytree').jstree({ …
thothal
  • 16,690
  • 3
  • 36
  • 71
3
votes
1 answer

construct string from group dplyr

I have a large data frame and I am trying to construct a string based on groups within the data frame for displaying in shinyTree. Here is an example of data: dat <- data.frame("region" = c(paste("region", rep(1:3, each=4))), "area" =…
anniemaggs
  • 63
  • 7
3
votes
1 answer

shinyTree: view without selecting

Consider the following: library(shiny) library(shinyTree) server <- shinyServer(function(input, output, session) { output$tree <- renderTree({ list( 'I lorem impsum'= list( 'I.1 lorem impsum' = structure(list('I.1.1 lorem…
Clarinetist
  • 1,097
  • 18
  • 46
2
votes
3 answers

input$shinyTree does not get updated after new render

In the shiny app below, I have a reset button, which, well, resets the shinyTree. I figured that the corresponding input$tree does not get updated after pressing the reset, i.e. input$tree still reflects the un-reset state. Try the app by moving…
thothal
  • 16,690
  • 3
  • 36
  • 71
2
votes
1 answer

R Shiny - Resetting shinyTree node selections

The app below contains a shinyTree, a reset button (Reset nodes) and a print output 'Selected nodes'. The print output prints the output of the get_selected function, which returns a list of selected nodes. Here is a screenshot of the tree on…
user51462
  • 1,658
  • 2
  • 13
  • 41
2
votes
1 answer

Tree View in R Shiny using shinyTree package

I am creating Tree View in R Shiny using shinyTree package, able to do the same. The code which has been used for server part has list creation. Now, additional requirement is to convert the dataframe into list and import the same to achieve the…
string
  • 787
  • 10
  • 39
1
vote
3 answers

Can you create a shinyTree in r with checkbox but only the children have checkboxes?

Is it possible to have only the lowest level children in a shinyTree have a checkbox? In the below screenshot I would like 'Recreational -Fishing' and 'Boat' to not have a checkbox but all the other children to have a checkbox (in screenshot;…
1
vote
1 answer

How do I change a dataframe in a nested list to a list

I have a data frame with three columns (Category, Sub.category and Acitivty). I need a nested list, with these three levels to put into shinyTree. I'm trying to match the format of this .Rds file to create a shinyTree. My full table is 99 lines,…
1
vote
1 answer

How to create a js checkbox in flexdashboard? shinyTree does not work (R, shiny)

I have a problem with using shinyTree in flexdashboard. In a regular shiny app works well: library(shiny) library(shinyTree) server <- function(input, output) { output$tree <- renderTree({ opciones = list('All'= list( 'Human' = …
1
vote
1 answer

How to pass shinytree values to drop down input in shiny

I'm trying to create dropdown input in shiny which has hierarchical drop-down list in R shiny like below: hierarchical drop-down list in R shiny For now I'm able to create an shinytree where we can display the entire list, but I want display the…
1
vote
1 answer

Save and restore selections in a shinyTree

Is it possible to save and restore selections of a shinyTree? I found a solution deleting the selections R Shiny - Updating shinyTree node selections but I need to save the selections and restore them later for example, by an actionButton
woec
  • 11
  • 2
1
vote
1 answer

ShinyTree with default selected value

I'm trying to implement a shinyTree that has a default selected value. Does anybody know if that is possibly? I couldn't find anything in the documentation or the examples that came with the package. Thanks for all the help.
hjonas
  • 141
  • 10
1
vote
1 answer

shinyTree: more than 3 hierarchical levels

I have the following code: library(shiny) library(shinyTree) server <- shinyServer(function(input, output, session) { output$level_tree <- renderTree({ list('1 level'= list( '1.1 level' = structure( list('1.1.1 level'='1', …
Antarqui
  • 467
  • 6
  • 18
1
vote
1 answer

Reducing a data.tree created from List

I'm working on a shiny app which plots data trees. I'm looking to incorporate the shinyTree app to permit quick comparison of plotted nodes. The issue is that the shinyTree app returns a redundant list of lists of the sub node plot. The actual list…
int64
  • 81
  • 4
1
2