Stop Update Package pane for specific package?

Hi,

I'm wondering if there is a way to disable a package from appearing in the update package pane? In this specific instance I have a package from github that has name collision with CRAN package. Therefore, RStudio thinks that the package is CRAN and since version is lower than the package on CRAN always includes it in update pane. Often I end up updating it by accident when just selecting to update all.

Not a huge pain because I realize issue and just redownload from github but would be nice to just prevent just that package from coming up in the update pane.

Thanks!
Sam

Do you own the package on GitHub? If so, I would change the name, if not, I would suggest to the author/maintainer to change the name given that there is a conflict with the main archive for R packages.

Otherwise, I don't think there is a great way to get udpdate.packages() to ignore packages in the pane. But something simple like this should probably work in a script or if you run it interactively to do batch updates:

dont_update <- function(pkgs) {
  need_updating <- data.frame(old.packages())
  to_update <- need_updating[!need_updating$Package %in% pkgs, ]
  install.packages(to_update$Package)
}
dont_update("pkg")

This function will accept a vector of package names to be excluded from updating. All others will be updated. When you run dont_update("pkg"), pkg won't be updated, but other packages will. Can modify the function as you see fit.