RStudio package manager and MRAN

Hi!

Is it possible or would it be possible in future to use the RStudio package manager with the MRAN repos from Microsoft to install packages depending on a specific date?

Bests
shearer

Great question!

RStudio Package Manager uses a dedicated RStudio service as the upstream source for CRAN packages. This service is not the same as a public CRAN mirror (like MRAN) and adds some extra metadata to help RStudio Package Manager track all the changes that occur on CRAN everyday. So the short answer is no, you can not point RStudio Package Manager at an MRAN snapshot.

However, in many discussions with R users and admins, most people's goal in using MRAN snapshots is to ensure reproducibility and help users in the company access a consistent set of packages (so that everyone is using the same package versions). RStudio Package Manager provides a few facilities to meet these goals:

  1. Curated CRAN sources allow full control over what packages are available to users and when they are updated. Curated CRAN sources automatically freeze packages at a certain date, but also include support for updating to a new date, adding packages from the original date after the fact, and even running hypothetical dry runs to see what changes would occur before committing them.

See an example as well as what it looks like to add or update packages.

  1. Frozen Repositories: RStudio Package Manager tracks every change to each repository. In upcoming releases, we'll add support for users to "freeze" a repository and get a URL that will always return the same version of a repository. We'll also add a user interface to make it easier for users to navigate the repository's history.

You probably weren't looking for such a long answer, but let me know if we can provide more information!

You may also be curious in how RStudio Package Manager integrates with different change control strategies.

2 Likes

Hi slopp,

thank you for your fast reply and the interesting answer.
I took a look at your referenced package manager example page and find it very impressive.

If I understand the functionality right I can choose for every package one of the archived versions shown at the bootom of the page.
Since the versions with corresponding release dates are given, I question me, if it would be possible to include a method in a future release which install chosen packages at a given date?

Something like
devtools::install_date('c(A3', 'dplyr', 'rms'), '2017-06-12')
instead of
devtools::install_version('A3', '0.9.1') and so on for the other packages.

I think it would be a nice alternative to MRAN with more flexibility due to the other options.

With
library(versions)
it would be possible to extract versions and release dates from given packages and therewith it would be possible to deternine the version at a given date followed by an install_version() command with this information.

str(available.versions("dplyr"))
List of 1
dplyr:'data.frame': 20 obs. of 3 variables: .. version : chr [1:20] "0.7.6" "0.7.4" "0.7.3" "0.7.2" ...
.. date : chr [1:20] "2018-06-29" "2017-09-28" "2017-09-09" "2017-07-20" ... .. available: logi [1:20] TRUE TRUE TRUE TRUE TRUE TRUE ...

Bests
shearer