Description Usage Arguments Note See Also Examples
Use this function to move older versions of a package to a specified archive directory, or remove them completely.
1 2 3 | archive.packages(repo.root, to.dir = "Archive", keep = 1, package = NULL,
type = "source", archive.root = repo.root, overwrite = FALSE,
reallyDoIt = FALSE)
|
repo.root |
Path to the repository root, i.e., the
directory which contains the |
to.dir |
Character string, name of the folder to move the old packages to. |
keep |
An integer value defining the maximum nuber
of versions to keep. Setting this to 0 will completely
remove all packages from the repository, which is
probably only useful in combination with the option
|
package |
A character vector with package names to
check. If set, |
type |
A character vector defining the package
formats to keep. Valid entries are |
archive.root |
Path to the archive root, i.e., the
directory to which files should be moved. Usually the
Archive is kept i |
overwrite |
Logical, indicated whether existing files in the archive can be overwritten. |
reallyDoIt |
Logical, real actions are only taken if
set to |
This function responds to
sandbox
.
sandbox
to run
archive.packages() in a sandbox.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
# dry run, only prints what would happen, so you can check
# if that's really what you want
archive.packages("file:///var/www/repo")
# after we've confirmed that the right packages will be moved
# and deleted, let's actually commit the changes
archive.packages("file:///var/www/repo", reallyDoIt=TRUE)
# if we don't want a standard archive, but for instance a parallel
# archive repository, we can have it. let's move all but the latest two
# versions from /var/www/repo to /var/www/archive. to suppress the
# creation of a special archive directory, we set to.dir=""
archive.packages("file:///var/www/repo", to.dir="", keep=2,
type=c("source", "win.binary", "mac.binary.leopard"),
archive.root="/var/www/archive", reallyDoIt=TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.