R package based on shiny interface

Hi!

I build a generic interface in shiny / shinydasboard and I wish to create a package out of it. Is there anything different between wrapping a normal package and shiny based package?

Thanks!
Rami

Hi,

One solution is to put the directory of your shinyapps (ui and server files) in the inst folder to make your files accessible when package is installed. Then use a function in your package which calls the shiny ui and server file:
shiny::runApp(system.file('appdir', package='packagename'))

It is explained in the deployement part of shiny website (end of the article)

Another solution is to save your app as a function. In this case, package developpement is not different from another non shiny package I think.

As an example, the radiant project is an example. An evolved one now as different parts of the app is divided in several package.

1 Like