I am developing a shiny app and since I wanted to use automated testing and documentation of the function, I started to develop the interface within a package (as recommende
When I make shiny applications as a stand-alone package, I usually organize the files as so:
In the R directory:
ui.R, server.R, or global.R files)launch_application function The definition of launch_application is similar to:
launch_application <- function(x, ...)
{
shiny::runApp(appDir = system.file("application", package = [my_pkg]),
...)
}
In the inst directory
application/server.Rapplication/ui.Rapplication/global.RAfter building and installing the package, I then just need to run
library(my_pkg)
launch_application(...)