Skip to content

Obtaining a repository URL#

Package installation tools in R and Python are typically configured, by default, to access packages from one or more public package repositories, such as CRAN, Bioconductor, or PyPI. To install packages from Package Manager, your environment must be reconfigured by changing the repository URL in your client.

Depending on your project needs, there are several different options for your repository URL.

Getting the latest packages available#

In most cases, you probably want to use the latest and greatest versions of packages available. This allows your package management tools to detect and install upgrades when available, and ensure you're using the most updated package features available.

  • From the top of the Package Manager home screen, select a repository from the list and then click SETUP .

Package Manager Setup tab screenshot, showing snapshot calendar with latest URL selected

  • In the Snapshots section, verify that No, install the most recent packages available option is selected .
  • To copy the URL to your clipboard, click Copy .

Package Manager Setup tab screenshot, showing snapshot calendar with latest URL selected

Next Steps: Configure your R or Python environment to use the repository URL

Getting frozen URLs for improving reproducibility#

A popular feature of Package Manager is date-based snapshots. A user specifies a date, and Package Manager provides a collection of packages limited to what was available on that date.

Info

Posit provides snapshots of public repositories every business day, but not on weekends or holidays. The calendar of available snapshot dates is shown on the page. (details)

  • From the top of the Package Manager home screen, select a repository from the list and then click SETUP .

Package Manager Setup tab screenshot, showing snapshot calendar with latest URL selected

  • In the Snapshots section, select the Yes, always install packages from the date I choose option. .
  • Scroll the calendar to select a snapshot date . Dates with an available snapshot are indicated by a box around the day.
  • To copy the URL to your clipboard, click Copy .

Info

Some days do not have a snapshot. For additional information, please view our Publishing Snapshots to the Posit Package Service documentation.

Package Manager Setup tab screenshot, showing snapshot calendar with binary and frozen URL

Tip

If your Python projects require strict dependency management, we recommend using Python features like requirements.txt or pipenv lock.

Next Steps: Configure your R or Python environment to use the repository URL

More about frozen URLs

Frozen URLs for R repos encode information about all the sources in the repository, as well as the snapshot date. Depending on the repository, you may see text describing the sources and snapshots included. Package Manager tries to keep the URL as simple as possible, but frequently needs to encode more complicated information, so you'll see some random-looking text after the date in the URL. Any of these criteria results in an encoded URL:

  1. Use of more than one source in a repository.
  2. Use of a source that does not support date aliases.
  3. Selecting a date that a date alias can't apply to (a date where a snapshot doesn't exist, and a past snapshot must be referenced instead).

When you use URL that includes a simple date-based alias that does not match an available snapshot, Package Manager attempts to find the nearest-matching snapshot. See Snapshot Identifiers for details.

When you get an encoded URL, Package Manager provides you with information about what the encoded URL contains. For example, the screenshot below shows a URL from a repository that contains two sources, CRAN and bioc-3.16:
Screenshot of decoded URL contents

Note

The Bioconductor source does not pin to a date - only to the Bioconductor version. For more information, see Bioconductor source details.