jsTreeR
jsTreeR copied to clipboard
Are there any examples of jsTreeR where the user can save/download a tree structure and later retrieve it/upload it into an active session?
I have built an App using jsTreeR where the tree structure the user creates is reflected in a mirror dataframe, and that dataframe then drives a series of mathematical operations. The user can create very elaborate trees with multiple branches. It would be helpful if the user could download or "save" a tree, naming each saved tree; and later upload or retrieve a tree to continue working on it or to simply activate that tree in order to run that mathematical operation. I could see a user needing a "library" of trees. Does jsTreeR have this capability? Are there any examples of this having been done?
I'm open to any suggestions. The image gives an example of "saving a tree"
.
Hmm, maybe there's a plugin for that, I don't know this one yet: https://stackoverflow.com/questions/35465803/jstree-wont-save-state-if-the-data-not-defined-in-core
But that will probably save the whole tree, not a part.
You can pass input[["yourTreeID_full"]]
into a list()
and e.g. save()
it as an .RData file. Later load()
it and pass it to jstree()
's nodes
parameter. Works fine.