Learn R Programming

managelocalrepo (version 0.1.5)

release_package: Release a package to the local repo.

Description

This will take a package from a given location and populate it to the relevant trees in the local repo. It will create terminal directories if needed.

Usage

release_package(package_location, repo_base, type = "win", version = "all", r_versions = c("2.15", "3.0", "3.1", "3.2"), ...)

Arguments

package_location
the full path to the package's file. This should be the package's file name represented by a character vector of length one.
repo_base
the base directory of the local repository represented by a character vector of length one.
type
the type of package file being released. Should be win (default), mac or src for Windows binary, Mac binary and source package distributions respectively.
version
determines which terminal directory to release the package file to, given a value for type that is either wim or mac. Can also use "all" to release the package to all terminal directories for either wim or mac. If type is src, then version is ignored, as this is not needed.
r_versions
a character vector of R versions. This is used to determine the terminal directories when type is "win" or "mac" and version is "all". Should follow the specifications set out in R Installation and Admin guide.
...
optional arguments to pass to file.path

Value

No return value. Will release a package to the desired local repo's terminal directory and update the relevant index file. Otherwise will return a suitable error message.

References

Setting up a package repository

Examples

Run this code
## Not run: 
# package_location <- file.path(".", "submissions")
# package_location <- file.path(package_location, "test_package.zip")
# repo_base <- file.path(".")
# release_package(package_location, repo_base)
# ## End(Not run)

Run the code above in your browser using DataLab