Reputation: 357
I find very nice and useful the so called "dueling select box" input widget ( https://github.com/rstudio/shiny-examples/tree/master/036-custom-input-control) and I would like to reimplement it in a new application as suggested by the author. However the instructions are quite obscure to me:
"If instead we wanted to make this line chart component easily distributable to other Shiny users, we would set it up as a package. chooser.R would go into the R subdirectory. The contents of www would be moved to inst, and chooserInput would call shiny::addResourcePath to make them available at a URL prefix like "chooser".
I made a subfolder "inst" in my working directory with the content of wwww (with a jawa script file) and the comand shiny::addResourcePath("chooser", path"/inst") in the chooser.R file. The code runs and I can populate the left box. However the right box (with selected items) is always empty. I suspect something is wrong in the in the way I let shiny know about the "inst" subfolder. Is somebody able to re-implement this example ? Thanks.
Upvotes: 0
Views: 55
Reputation: 357
I realized that I need to make a widget first. The process is not so easy but it is reasonabily well described in: https://shiny.rstudio.com/articles/js-build-widget.html Hope to ssve someonelse time.
Upvotes: 0