ppm_repo_url: Returns the current Posit Package Manager (PPM) repository...

View source: R/ppm.R

ppm_repo_urlR Documentation

Returns the current Posit Package Manager (PPM) repository URL

Description

Returns the current Posit Package Manager (PPM) repository URL

Usage

ppm_repo_url()

Details

This URL has the form {base}/{repo}, e.g. ⁠https://packagemanager.posit.co/all⁠.

To configure a hosted PPM instance, set the PKGCACHE_PPM_URL environment variable to the base URL (e.g. ⁠https://packagemanager.posit.co⁠).

To use repo_add() with PPM snapshots, you may also set the PKGCACHE_PPM_REPO environment variable to the name of the default repository.

On Linux, instead of setting these environment variables, you can also add a PPM repository to the repos option, see base::options(). If the environment variables are not set, then ppm_repo_url() will try to extract the PPM base URL and repository name from this option.

If the PKGCACHE_PPM_URL environment variable is not set, and the repos option does not contain a PPM URL (on Linux), then pkgcache uses the public PPM instance at ⁠https://packagemanager.posit.co⁠, with the cran repository.

Value

String scalar, the repository URL of the configured PPM instance. If no PPM instance is configured, then the URL of the Posit Public Package Manager instance. It includes the repository name, e.g. ⁠https://packagemanager.posit.co/all⁠.

See Also

The 'pkgcache and Posit Package Manager on Linux' article at https://r-lib.github.io/pkgcache/dev/.

repo_resolve() and repo_add() to find and configure PPM snapshots.

Other PPM functions: ppm_has_binaries(), ppm_platforms(), ppm_r_versions(), ppm_snapshots()

Examples

ppm_repo_url()

pkgcache documentation built on July 26, 2023, 5:44 p.m.