Friday, April 19, 2013

Automated Re-Install of Packages for R 3.0


  1. #Get currently installed packages
  2. package_df <-as.data.frame(installed.packages("/Library/Frameworks/R.framework/Versions/2.15/Resources/library"))
  3. package_list <- as.character(package_df$Package)
  4.  
  5. #Re-install Install packages
  6. install.packages(package_list)

    you can also use a more direct method:
    update.packages(ask=FALSE, checkBuilt = TRUE)
    from: http://randyzwitch.com/automated-re-install-of-packages-for-r-3-0/

No comments:

Post a Comment