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.
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:
Why do other communities using languages such as python, ruby, and javascript find package managers necessary?
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 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.
It is often a two step process:
Identify the system libraries an R needs
Install them using the OS package manager
There is some tools and service to help with that like sysreqs and its sysreqs.
On some specific OS like debian, there is some precompiled available in the OS package manager, here apt-get.
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.