, , ,

Many a times when we update the R with latest release, we face with this trouble:

I was using some list of ‘X’ packages on my old version of R (and RStudio) say V. 3.2.3

Recently I updated my system with latest release of R (say 3.2.4).

But I want to have same packages which I was using earlier in my previous installation.

How can I get them back?

Well, if you already have updated your system, this tutorial might not help.

But if you are planning to update, then this tutorial can save you from many problems and issues.

What I have done here is, simply I have created a bunch of small functions which do the following:

  • Option 1: it will ask you to create a directory where the list of your existing packages can be stored.
    And then saves the list of R packages in that directory.
  • Once list is saved, then you can update the “R” and re-run the script with “Option 2”

    You will get your packages back again.


    source(” https://raw.githubusercontent.com/imanojkumar/Install_Package_From_List/master/reinstall_package.R “)

    For more details, visit my github depository:
    My GitHub

    Please note that only packages which were installed from CRAN will be installed.

    Packages from other sources such as “Bioconductor” needs to be installed separately:

    source(” https://bioconductor.org/biocLite.R “)
    ## Install specific packages, e.g., “GenomicFeatures” and “AnnotationDbi”, with
    biocLite(c(“GenomicFeatures”, “AnnotationDbi”))