upgrade just one package in packrat project upgraded all project

packrat

#1

there's something i dont understand from Packrat.
i suppose a snapshot is a moment in time for all the library in the project. So when I need to upgrade a package I followed the procedure commented here:


packrat::on()
install.packages("pkgname")
packrat::snapshot()

But when I did it, packrat upgraded all the packages in the project......
I only needed to upgrade ONE package.

is that the correct behaviour?


#2

packrat::snapshot() basically saves the state of the Packrat library to the lockfile. If installing that package also implied updating / installing any dependencies, or if those dependencies had changed at some other point in time, then those packages will be updated as well.


#3

That behaviour broke things that was supposed to be preserved by the “library snapshot concept”

Is there any way of updating just one package?


#4

Try update.packages(oldPkgs = "pkgname")