View source: R/build-runtime.R
| embed_r_runtime | R Documentation |
Behavior-preserving extraction of the R bundled-embedding block from
build_electron_app(). ALWAYS installs + copies the interpreter (and resolves
symlinks) so the shared runtime/R path exists for suite-wide bundled
detection; only the package install is gated on a non-empty package set
(packages plus any local packages and their declared dependencies).
packages is the DIRECT set (as stored in dependencies.json); the recursive
dependency closure and the pre_installed setdiff are resolved here, against
the freshly-created runtime/R/library. Local packages are installed last,
with install_local_r_packages().
embed_r_runtime(
output_dir,
packages,
repos,
version,
platform,
arch,
verbose = TRUE,
prune = TRUE,
local_packages = character(0)
)
output_dir |
Character. The Electron app output directory. |
packages |
Character vector. DIRECT R package names (may be empty/NULL). |
repos |
Character vector. CRAN-like repository URLs. |
version |
Character. Resolved R version (non-NULL from callers). |
platform |
Character scalar. Target platform ("win"/"mac"/"linux"). |
arch |
Character scalar. Target architecture ("x64"/"arm64"). |
verbose |
Logical. Whether to display progress. |
prune |
Logical. Whether to remove the test and documentation files
that |
local_packages |
Local R packages to install into the bundled library
after the repository packages: the list |
Invisibly, the path to the embedded runtime/R directory.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.