r-lib / remotes

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

Feature request: "Dry run" of install #748

Closed dmurdoch closed 10 months ago

dmurdoch commented 1 year ago

I'm working on a Bookdown project with several authors, using a number of packages that are on CRAN and Github. I think it's bad for code in a book to install packages without asking, but it would be helpful to check whether the currently installed packages are up to date. So what I'd like to put in a code chunk is something like this:

do_installs <- "never"     # Modelled after the upgrade arg
install_github("dmurdoch/tables", do_install = do_installs)
... same for several other packages ...

and have it check for updates to the package, and print a warning like

Warning:  package "tables" is not up to date with the Github version

or

Warning:  package "tables" is not installed

(I want a warning on the last one so I can see all the uninstalled packages in one run.)

gaborcsardi commented 1 year ago

A workaround is to set up a temporary library for the examples, and install there.

Nevertheless this would indeed make sense, but we are focusing on r-lib/pak, so it is unlikely that we'll implement this in remotes.

gaborcsardi commented 10 months ago

As it is unlikely that this will be implemented here, I am going to close it.