none
update MRO in RStudio using installr() RRS feed

  • Question

  • Can one use installr() to update MRO in RStudio including the MKL math libraries? If this is not possible, what is the recommended process to update MRO to the latest version and still retain and update installed packages that are being used in RStudio, and still have the MKL math libraries active?

    Is it better to update RStudio first and then MRO, or the other way around?

    I am currently running Revolution R Open 3.2.2 and RStudio Version 0.99.491 on Platform: x86_64-w64-mingw32/x64 (64-bit)

    Thanks for the assistance

    Wednesday, October 26, 2016 4:16 AM

Answers

  • The 'checkpoint' package provides a different way of working with and maintaining R packages - it uses the idea of a package 'snapshot' that lets you maintain different versions of specific R packages corresponding to a particular date. On the other hand if you use standard R functions such as 'update.packages()' you can only work with the latest version of a particular R package.

    Your right that their is no need to run update.packages() if you are using 'checkpoint' - instead you just supply the 'date' as input to the checkpoint function and an existing package library folder and the checkpoint() function will automatically install the latest versions of your existing R packages.

    Stephen Weller

    Monday, November 7, 2016 4:28 PM

All replies

  • The recommended way to currently maintain and update R packages in MRO would be to use either the update.packages() function from the 'utils' package in the R-console, or use the 'checkpoint' package that is included with Microsoft R Open. The checkpoint package allows you to maintain snapshots of R packages that correspond to a particular CRAN date.

    We currently don't have an automated way to update MRO - you have to uninstall the old version via 'Add/Remove Programs' and then install the new version from the MRAN website: 

    https://mran.revolutionanalytics.com

    We will consider adding such an option in a future release. in general it is best to update MRO first, then update RStudio.

    Stephen Weller

    Microsoft R Product Team


    Wednesday, October 26, 2016 4:15 PM
  • Thank you Stephen for your assistance, hopefully soon such an option for installr() will be available.

    To retain my libraries, can I first copy the library folder from the R-3.2.2 folder and then replace the library folder that will be created in the new R-3.3.1 folder with my saved library folder? 

    Thanks again.

    Thursday, October 27, 2016 12:48 PM
  • Does that mean that "update.packages" and "checkpoint" are mutually exclusive? In other Words, is it enough to run "checkpoint" and there is no need to run "update.packages" afterwards?
    Wednesday, November 2, 2016 9:50 AM
  • No, that is not recommended and will almost surely cause problems with running some R packages in the new version of R(3.3.1). Unfortunately, some R packages depend heavily on running a specific version of the R engine.

    The best thing to do to continue to use your existing libraries in the new version of R would be to do the following:

    1). In R-3.2.2:

    system.packages <- row.names(installed.packages(priority="high"))

    # Get list of installed user package names.

    user.packages <- setdiff(row.names(installed.packages(), system.packages)

    save(user.packages, file = "mypackagelist.RData")

    2). In R-3.3.1:

    load("mypackagelist.RData")

    install.packages(user.packages)

     

    Stephen Weller

    Microsoft R Open Product Team

     
    Monday, November 7, 2016 4:18 PM
  • The 'checkpoint' package provides a different way of working with and maintaining R packages - it uses the idea of a package 'snapshot' that lets you maintain different versions of specific R packages corresponding to a particular date. On the other hand if you use standard R functions such as 'update.packages()' you can only work with the latest version of a particular R package.

    Your right that their is no need to run update.packages() if you are using 'checkpoint' - instead you just supply the 'date' as input to the checkpoint function and an existing package library folder and the checkpoint() function will automatically install the latest versions of your existing R packages.

    Stephen Weller

    Monday, November 7, 2016 4:28 PM
  • Thanks again Stephen, that is a great help.
    Tuesday, November 8, 2016 3:51 AM