Learn R Programming

polished (version 0.4.0)

deploy_app: Deploy a Shiny app to Polished Hosting

Description

Deploy a Shiny app to Polished Hosting

Usage

deploy_app(
  app_name,
  app_dir = ".",
  api_key = getOption("polished")$api_key,
  launch_browser = TRUE,
  region = "us-east1",
  ram_gb = 2,
  r_ver = NULL,
  tlmgr = character(0)
)

Arguments

app_name

You Shiny app's name.

app_dir

The path to the directory containing your Shiny app.

api_key

Your polished.tech API key. Defaults to getOption("polished")$api_key.

launch_browser

Whether or not to open your default browser to your newly deployed app after it is successfully deployed. TRUE by default.

region

the region to deploy the app to on Google Cloud Platform. See https://cloud.google.com/compute/docs/regions-zones for all available regions on Google Cloud Platform. Currently on "us-east1" is supported, but soon, all regions will be supported.

ram_gb

the amount of memory to allocate to your Shiny app server. Valid values are 2, 4, or 8.

r_ver

Character string of R version. If kept as NULL, the default, then deploy_app() will detect the R version you are currently running. The R version must be a version supported by an r-ver Docker image. You can see all the r-ver Docker image versions of R here https://github.com/rocker-org/rocker-versioned2/tree/master/dockerfiles and here https://github.com/rocker-org/rocker-versioned/tree/master/r-ver.

tlmgr

a character vector of TeX Live packages to install. This is only used if your Shiny app generates pdf documents. Defaults to character(0) for no TeX Live installation. Set to TRUE for a minimal TeX Live installation, and pass a character vector of your TeX Live package dependencies to have all your TeX Live packages installed at build time.

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
deploy_app(
  app_name = "polished_example_01",
  app_dir = system.file("examples/polished_example_01", package = "polished"),
  api_key = "<your polished.tech API key>"
)
# }
# NOT RUN {

# }

Run the code above in your browser using DataLab