AndreaCirilloAC / updateR

update your R version in a breeze ( on OSX) √
Other
143 stars 23 forks source link

Transfer all current packages to new R installation #14

Open carloscinelli opened 7 years ago

carloscinelli commented 7 years ago

Hi guys!

If you could make updateR transfer all current packages to the new R installation this would be great!

AndreaCirilloAC commented 7 years ago

@carloscinelli this would be a great improvement indeed! thank you for suggesting it. I would start from installed.packages() to derive a list of installed packages, and then add a command once the installation is complete to install them. something like:

installed.packages() %>% 
  as.data.frame() %>% 
  select(Package) %>% 
  as.vector() -> needed_packages
needed_packages <- paste(unlist(needed_packages))

and at the end

install.packages(needed_packages, verbose= TRUE)

feel free to take this further a propose a pull request, if you will. 😀 thank you once again