Description Usage Arguments Details
View source: R/save_eviatlas_app.R
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.
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
)
|
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 |
If run_app = TRUE
the function will start the Shiny app once the
files are written.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.