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.
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.
Set the 'stselected' attribute of your desired nodes to TRUE
Example:
output$tree <- renderTree({
sss=list('Nodes' = list('Node1' = '1', 'Node2' = '2'))
attr(sss[[1]][['Node1']],"stselected")=TRUE # <---
attr(sss[[1]],"stopened")=TRUE
sss
})