save_eviatlas_app: Save a Shiny App to an app.R file.

Description Usage Arguments Details

View source: R/save_eviatlas_app.R

Description

This function will create three files in the out_dir: server.R, ui.R, and global.R. The contents of server.R and ui.R will be the source code of the server_function and ui_function, respectively. The global.R file will only contain library calls for shiny and any other packages specified in the pkgs parameter.

Usage

1
2
3
4
5
6
7
8
save_eviatlas_app(
  ui_function = eviatlas::shiny_ui,
  server_function = eviatlas::shiny_server,
  pkgs = c("eviatlas", "tidyverse"),
  out_dir = "shiny",
  overwrite = TRUE,
  run_app = FALSE
)

Arguments

ui_function

the function for the UI.

server_function

the function for the server.

pkgs

any packages that need to be loaded for the app to work. At minimum the package containing the shiny app should be included.

out_dir

the directory to save the shiny app files.

overwrite

delete the existing out_dir directory if it already exists

run_app

whether to run the app once the files are saved

Details

If run_app = TRUE the function will start the Shiny app once the files are written.


conoroheocha/NBSVisTool documentation built on Feb. 24, 2022, 12:25 a.m.