R/run_example.R

Defines functions run_example

Documented in run_example

#' Run examples
#'
#' This function runs an example R Shiny app showcasing different parts of the
#' package. Code for the app can be found in the inst/example_app folder in the
#' source code.
#'
#' The app uses the [bslib package](https://rstudio.github.io/bslib/) as is
#' generally recommended for Shiny apps.
#'
#' The app is also deployed at the following URL:
#' https://department-for-education.shinyapps.io/shinygovstyle-example-app/
#'
#' @return runs an R Shiny app with examples in
#' @export
#' @examples
#' if (interactive()) run_example()
run_example <- function() {
  appdir <- system.file(package = "shinyGovstyle", "example_app")
  shiny::runApp(appdir)
}

Try the shinyGovstyle package in your browser

Any scripts or data that you put into this service are public.

shinyGovstyle documentation built on April 13, 2026, 5:06 p.m.