r-lib / remotes

Install R packages from GitHub, GitLab, Bitbucket, git, svn repositories, URLs
https://remotes.r-lib.org/
Other
331 stars 152 forks source link

add lib argument to update_packages #662

Open japhir opened 2 years ago

japhir commented 2 years ago

I have both a private repository of packages in "~/R/x86_64-pc-linux-gnu-library" as well as a root-level one that is managed through my system package manager (pacman, with packages from the Arch User Repository, e.g. tidyverse).

This means that if I want to update development packages that are in my local library, I want to specify that it should only update those packages. With install.github() I can do this with the lib = "~/R/x86_64-pc-linux-gnu-library" argument. In remotes::update_packages() this argument appears not to exist, and it asks to update all the packages in the /usr/lib/R, which it doesn't have write access to.

I'd like to be able to specify that update_packages() should only be looking at packages in a certain directory, as is possible with update.packages().

japhir commented 2 years ago

To clarify: I can pass the lib argument, but this does not limit update to packages in that library. If there are updates to packages in /usr/lib/R they are "updated", but installed in the lib.