run | R Documentation |
These functions are convenient in the framework of a course whose learnrs and
Shiny applications may be updated during the course. The update()
function
checks if an update is available (respecting the version of R), and the
run()
(for learnrs), or runApp()
(for Shiny applications) manage to
run the item in a friendly way.
run(
tutorial,
package,
github_repos = NULL,
...,
update = ask,
ask = interactive(),
upgrade = "never"
)
run_app(
app,
package,
github_repos = NULL,
...,
update = ask,
ask = interactive(),
upgrade = "never",
in.job = TRUE,
max.wait = 60
)
update_pkg(package, github_repos, upgrade = "never")
tutorial |
The name of the tutorial to use. If not provided, a list of available tutorials is displayed. |
package |
The package from where to run the tutorial. |
github_repos |
The GitHub repository where the package is developed (for
updates), use |
... |
Further arguments passed to |
update |
Do we check for an updated version first, and if it is found, update the package automatically? |
ask |
In case |
upgrade |
When a new version of the main package is found, do we also
upgrade dependencies ? By default, never, but use |
app |
The name of the Shiny application to run. If not provided, a list of available apps is displayed. |
in.job |
Should the application be run in a Job in RStudio ( |
max.wait |
How many seconds do we wait for the Shiny app to start (60 sec by default)? |
The result returned by run_tutorial()
for run()
, or by
runApp()
for run_app()
. The update()
function return TRUE
or
FALSE
, depending if the package is updated or not.
run_tutorial()
, runApp()
## Not run:
#' # To start from a list of available tutorials:
run(package = "my_package")
run("my_tutorial", package = "my_package")
run_app(package = "mypackage")
run_app("my_shiny_app", package = "mypackage")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.