It’s a Shiny app!
app.R is in the root directory, so you can launch the project as a Shiny app on a server as is. No package installation is required. Instead,
app.R automatically loads all the required R scripts and data files.
It’s a package!
app.R is listed in
.Rbuildignore, you can install the package as is.
Then, you can run the Shiny app locally.
But what if my app uses compiled code?
Follow the CRAN directions to build your package on top of C, Fortran, or whatever compiled language you’re using. Then, all you need is an
app.R that installs the package on the server and then launches your app with a function call. For this example, the server-side
app.R would look like this.
install_github("wlandau/appPackage") library(appPackage) my_app()
Here, feel free to discard the
app.R inside the package and remove the
app.R listing from
What of my project gets too big and messy?
Overambitious projects tend to get bloated, cluttered, and slow, especially when substance and interactivity fall under the same roof. If you do serious computation behind the scenes in
xyzShinyApp, you could encapsulate the hidden core functionality in a separate package: say,
xyzEngine. I used this exact approach in my dissertation project. Package
fbseq processes user input and Monte Carlo output, and
fbseqCUDA actually fits the model given an already-parsed set of instructions.