sandbox: Run actions in a sandbox

Description Usage Arguments Details Value See Also Examples

Description

If you want to test the effects of roxy.package, archive.packages or debianize, you can activate a sandbox with this function.

Usage

1
2
3
sandbox(active = FALSE, sandbox.dir = file.path(tempdir(), "roxyPackge",
  "sandbox"), pck.source.dir = TRUE, R.libs = TRUE, repo.root = TRUE,
  archive = repo.root)

Arguments

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 neccessary (at first use, not when setting this here!).

pck.source.dir

Logical, whether to sandbox the package sources. If TRUE the full package sources will be copied to file.path(sandbox.dir, "src") (at first use, not when setting this here!).

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 file.path(sandbox.dir, "R") (at first use, not when setting this here!).

repo.root

Logical, whether to sandbox the repository. This repository will be set up in file.path(sandbox.dir, "repo") (at first use, not when setting this here!).

archive

Logical, whether to sandbox the repository archive. The archive will be set up in file.path(sandbox.dir, "repo_archive") (at first use, not when setting this here!).

Details

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.

Value

Settings are stored in an internal environment, so there is no actual return value.

See Also

sandbox.status to see the current settings.

Examples

1
2
3
4
5
## Not run: 
# turn sandboxing on
sandbox(active=TRUE)

## End(Not run)

saurfang/roxyPackage documentation built on May 29, 2019, 3:20 p.m.