The default file="dev/run_dev.R"
launches your {golem}
app with a bunch
of useful options. The file content can be customized and file
-name and
path changed as long as the argument combination of file
and pkg
are
supplied correctly: the file
-path is a relative path to a {golem}
-package
root pkg
. An error is thrown if pkg/file
cannot be found.
Usage
run_dev(
file = "dev/run_dev.R",
pkg = get_golem_wd(),
save_all = TRUE,
install_required_packages = TRUE
)
Arguments
- file
String with (relative) file path to a
run_dev.R
-file- pkg
Path to the root of the package. Default is
get_golem_wd()
.- save_all
Boolean; if
TRUE
saves all open files before sourcingfile
- install_required_packages
Boolean; if
TRUE
install the packages used inrun_dev.R
-file
Details
The function run_dev()
is typically used to launch a shiny app by sourcing
the content of an appropriate run_dev
-file. Carefully read the content of
dev/run_dev.R
when creating your custom run_dev
-file. It has already
many useful settings including a switch between production/development,
reloading the package in a clean R
environment before running the app etc.