Expand the callout boxes below to review what we’ve covered in the last four chapters:
Whole app game (Chapter 1)
1 Whole app game walks through the ‘whole game’ of the app-package development workflow. The application in this example comes from the Packages chapter of Mastering Shiny.
Chapter 1 Applications
The applications in Chapter 1 (Whole app game) can be accessed with the launch() or get() functions from the shinypak R package:
The following chapters will continue with app-package development, emphasizing developing a Shiny application within a package structure. A preview of each topic covered in the upcoming chapters is provided below.
Documentation (Chapter 5)
5 Documentation covers documenting the code in your app-package with roxygen2:
Required tags: @title, @description, @details, @param, @return, and @examples
App-package tags for modules and standalone app functions: @seealso, @family, and @section
Dependencies (Chapter 6)
6 Dependencies dives into the external (i.e. add-on) functions and packages you’ve used to build your app-package. We’ll also cover how to export functions and objects from your app-packages for others to use.
Exporting functions from your package namespace
@export/export()
Importing functions from add-on packages into your package namespace
NAMESPACE directives
The Imports field in the DESCRIPTION
Data (Chapter 7)
7 Data covers how to include datasets in your app-package namespace, and the various kinds of data in R packages.
Documenting data with roxygen2 using @format, \describe, \item
Location of data files: data/ vs. data-raw/ vs. inst/extdata/
Launch (Chapter 8)
The 8 Launch chapter covers how to 1) run your application during development, 2) how to run your app using a standalone app function, and 3) how to deploy your application to shinyapps.io.
What goes in app.R?
shinyApp() vs. shinyAppDir() vs. runApp()
rsconnect::deployApp()
External files (Chapter 9)
9 Resources covers how to include external resources (i.e. the images, CSS, html, or other files that are typically included in the www/ folder and served when you run your Shiny app). This chapter also covers other uses for the isnt/ folder in app-packages.