use_app: Add an existing Shiny app to a source package in development

Description Usage Arguments Details See Also Examples

Description

Copy an existing Shiny app to a source package (not an installed package) and create DESCRIPTION and Readme.md template files related to Shiny showcase mode.

Usage

1
2
use_app(app, path = "inst", description = TRUE, readme = TRUE,
  overwrite = FALSE)

Arguments

app

character, path to app directory.

path

character, path app is copied to; should be under source package inst directory. See details.

description

logical, add a DESCRIPTION file template for showcase mode. See details.

readme

logical, add a Readme.md file template for showcase mode. See details.

overwrite

logical, overwrite files. See details.

Details

Since this function is for use in a package development context, it is assumed your working directory is the package root directory, hence the default path = "inst". You can create description and readme with use_app and then edit these files. Alternatively, you can create them directly and with greater control using use_app_description and use_app_readme. Also, if a rsconnect directory exists in app it is not retained in the new copy in path.

When overwrite = TRUE, overwrite a previously added app at path. Also overwrite any pre-existing DESCRIPTION or Readme.md files copied from the source app if description = TRUE or readme = TRUE. In the latter case, existing files inside app are never overwritten. Rather, new template files are created in path in place of the copied files.

See Also

use_app_description, use_app_readme

Examples

1
2
# Copy an external app to a 'shiny' subdirectory inside package source 'inst' directory.
## Not run: use_app(app = "../external_app", path = "inst/shiny")

leonawicz/pkgpeanuts documentation built on June 7, 2019, 2:56 a.m.