Description Usage Arguments Details Value Author(s) Examples
View source: R/insertPackage.R
R can use multiple archives: CRAN, BioConductor and Omegahat have been supported for years. It is equally easy to add local archives from the same machine, or local network, or university / company network as well as other publically available repositories. This function aids in the process, and defaults to inserting a given source archive into a given repository.
1 2 3 4 5 |
file |
An R package in source or binary format, |
repodir |
A local directory corresponding to the repository top-level directory. |
commit |
Either boolean toggle to select automatic git operations ‘add’, ‘commit’, and ‘push’ or, alternatively, a character variable can be used to specify a commit message; this also implies the ‘TRUE’ values in other contexts. |
pullfirst |
Boolean toggle to call |
action |
A character string containing one of: “none”
(the default; add the new package into the repo, effectively masking
previous versions), “archive” (place any previous versions into
a package-specific archive folder, creating such an archive if it does
not already exist), or “prune” (calling |
... |
For |
This function inserts the given (source or binary) package file
into the given (local) package repository and updates the
index. By setting the commit option to TRUE, one can
then push to a remote git code repository. If the
git2r package is installed, it is used for
the interaction with the git repository; otherwise the git
shell command is used.
An aliased function insert is also available, but not
exported via NAMESPACE to not clobber a possibly unrelated
function; use it via drat:::insert().
NULL is returned.
Dirk Eddelbuettel
1 2 3 4 5 6 7 8 9 10 | ## Not run:
insertPackage("foo_0.2.3.tar.gz") # inserts into (default) repo
insertPackage("foo_0.2.3.tar.gz", "/nas/R/") # ... into local dir
## End(Not run)
## Not run:
insertPackage("foo_0.2.3.tar.gz", action = "prune") # prunes any older copies
insertPackage("foo_0.2.3.tar.gz", action = "archive") # archives any older copies
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.