use_apps.Rd
Include Shiny apps from a local clone of the SNAP shiny-apps repository in the local clone of the snapapps package.
use_apps(id, base_path = ".", source_path = "../shiny-apps", res_path = "inst/shiny", description = TRUE, readme = TRUE, overwrite = FALSE)
id | character, app directory name. |
---|---|
base_path | base file path, defaults to working directory. |
source_path | character, path to source directory containing apps to be copied. See details. |
res_path | character, path to installed resources where apps will be copied to. See details. |
description | logical, add a |
readme | logical, add a |
overwrite | logical, overwrite previously added apps. |
This function will check (assuming default arguments) to see if local git repositories exist
for both the snapapps
package and the SNAP shiny-apps
repository.
This is assuming it is called with the snapapps
directory as the working directory, that source_path
is unchanged, and that they are
adjacent to each other.
For general use, change base_path
to your source package root directory and
change source_path
to whatever directory contains your existing apps.
By default, use_apps
also assumes the package installed resources location for apps is be "inst/shiny"
.
If id
is a valid app directory in the latter, it will be copied to the former. id
may be a vector.
This function should be used once per included app. It should only be reused (to update an app) if changes have not been made
to the copy previously placed in snapapps
or you will lose those changes.
At this time, the canonical source is the shiny-apps
repository, though this may swap to snapapps
in the future
when critical mass favors the package, as well as more apps being includes from sources other than shiny-apps
.
This function should be called for copying apps into the snapapps
top level directory. It will place apps in inst/shiny
.
Another base path should only be used if apps are to be copied to some other location that snapapps
for some reason.
# NOT RUN { use_apps(id = "rvdist") # }