Problem setting shinyUIDir in runExampleApps when using my own project

Trying to create the function that loads the project into the temporary directory.

This is the line that is causing the problem:

# copy server.R, ui.R, www etc.
# shinyUiDir <- system.file("examples", "01_hello", package = "shiny")
shinyUiDir <- system.file("R", package = "EdaWeb")

I don’t know where my application will install to, so all I need to do is find out what to name my shinyUiDir and this script should work, but given I can’t get my Docker image to build because it is not looking in the R directory, it’s unclear where to build the list of files from. The directory would be wherever the installation directory is, and then inside the R directory.


Putting your Shiny files inside the R directory of your package will almost surely fail, since that directory is meant to contain the R functions of your package.

A typical place you would put the Shiny interface would be inside the inst/ui directory of the package, which you can then locate using

shinyUiDir <- system.file("ui", package = "EdaWeb")