sandbox | R Documentation |
If you want to test the effects of roxy.package
,
archive.packages
or debianize
,
you can activate a sandbox with this function.
sandbox(
active = FALSE,
sandbox.dir = file.path(tempdir(), "roxyPackge", "sandbox"),
pck.source.dir = TRUE,
R.libs = TRUE,
repo.root = TRUE,
archive = repo.root,
clean = FALSE
)
active |
Logical, whether sandboxing should be active or not |
sandbox.dir |
Character string, full path to the sandbox root directory to use. Will be created if necessary (at first use, not when setting this here!). |
pck.source.dir |
Logical, whether to sandbox the package sources. If |
R.libs |
Logical, whether to sandbox the R library directory, that is, the directory
to install the package to. Since this needs also to provide all package dependencies,
those packages will be copied to |
repo.root |
Logical, whether to sandbox the repository. This repository will be
set up in |
archive |
Logical, whether to sandbox the repository archive. The archive will be
set up in |
clean |
Logical,
whether to always clean the defined |
Sandboxing means that you are able to specify which groups of actions should only be run in a separate environment. This can be useful if you don't want to make changes to your actual package code, but inspect the result first.
With this function, you can turn sandboxing on and off. This setting has effects only in the currently running R session. By default, sandboxing is off.
Settings are stored in an internal environment, so there is no actual return value.
When using sandboxing for your source code, be aware that changes to the original code
will not be updated in the sandbox automatically. For example,
if you run roxy.package
to check your package,
fix an issue in the original source location and run roxy.package
again,
your changes will not have affected the code in the sandbox directory. For those cases,
it might be advisable to use the clean=TRUE
option.
sandbox.status
to see the current settings.
## Not run:
# turn sandboxing on
sandbox(active=TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.