Learn R Programming

packager (version 1.15.2)

get_pkg_archive_path: Create a Package's Archive Path From the Package's DESCRIPTION

Description

The archive file does not have to exist. Use file.exists(get_pkg_archive_path()) to test existence.

Usage

get_pkg_archive_path(path = ".", absolute = TRUE)

Value

Path to the package's archive file.

Arguments

path

Path to the package directory (see devtools::as.package).

absolute

Return the absolute path?

Examples

Run this code
package_path <- file.path(tempdir(), "anRpackage")
usethis::create_package(path = package_path)
print(tarball <- get_pkg_archive_path(package_path))
file.exists(tarball)

Run the code above in your browser using DataLab