What is the current state of R package mangers in 2019?

I normally install packages with install.packages(). I was recently playing with a command line tool written in R. This lead me to become curious about package managers that are more suitable for the command line -- something like pip, pipenv, yarn, etc -- but for R.

I ended up finding jetpack and pak.

Jetpack looks command line friendly, but may suffer from a system dependency issue stemming from packrat. This is probably not a big issue. I was more suprised that packrat was not as robust as I thought.

Pak looks like a reimagination of install.packages(), but I have not seen documentation on using this package for command line purposes.

So my questions are as follows:

  1. Why do other communities using languages such as python, ruby, and javascript find package managers necessary?

  2. If communities using other languages have found a lot of value in package managers why has this trend not transferred to the R users/programmers community?


It is not package manager per se but for CLI with R there is littler
There is some pre made script for :package: installation presented in examples and script folder.

About packrat, it works well and system dependency is not an easy task. One face is that it is not always possible for a user to install linux dependencies on a server. I am curious if python pip can deal with that or not. :thinking:

It is often a two step process:

  1. Identify the system libraries an R :package: needs
  2. Install them using the OS package manager

There is some tools and service to help with that like sysreqs and its :package: sysreqs.

On some specific OS like debian, there is some precompiled :package: available in the OS package manager, here apt-get.

If you find something, please share!


This is a really great question. To start, I think it might help if you distinguish between package installation and package management.

Package installation (which is a subset of package management) is all about getting a package from a repository into a library on your computer, along with any of the package's dependencies.

Package management, on the other hand, includes package installation but also encompasses workflows for monitoring what packages are in an environment overtime, with the aim of restoring those environments and reproducing work.

Most tools aimed at package management have some functionality for installation, examples include packrat, conda, and npm. But there are some tools that just do installation, such as pak, pip, apt, and yum.

A big reason R doesn't have as rich an ecosystem for package installation tools (as compared to other languages) is because CRAN's design alleviates many of the challenges traditionally faced in package installation. As an example, CRAN checks new package updates to ensure they work with their upstream reverse dependencies. If updates fail to pass these "revdep checks", the package author must shoulder the burden of getting those reverse dependencies in line. Overall, this ensures that users going to install.packages get a set of packages that work together. Other languages push more of this work onto the person (and client) installing the package.

However, as the R package ecosystem has grown, and people have developed more mission-critical workflows that require reproducibility, we have seen an uptick in the need for package management (as opposed to installation) tools. This is one reason we've invested in RStudio Package Manager. RStudio is committing other resources to this objective as well, such as an upcoming packrat replacement, continued work on pak, and an increase in documentation.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.