Oct 4, 2016

How to Upgrade R version in Windows. The easy way recommended on CRAN

Today I have found myself needing to upgrade R. Main reason was that my current version  R-3.2.1 did not support some new graphic packages. To install these new packages I needed at least a R-3.3 version.

After a bit of initial hesitation (will I lose my packages during the new installation? etc. etc.) I finally took some courage and decided to follow the official documentation on CRAN. Everything worked just fine and I have now installed the latest available R version on CRAN: at the time I write this post it´s R-3.3.1.

The upgrading process was really easy, so I thought to share it step by step. Enjoy :)


1. Check your current R version

To find out your current version, open R and it will be shown in the console. If you are using RStudio you can check you R version by clicking on Tools>Global Options... yep my current version is now R-3.3.1.

Find your R version

2. Locate your current R folder 

If you did not change the default path in your previous installation, you should be able to find the main R folder under C:\Program Files\R.

Make sure to locate your library folder too (the one containing all the packages you installed so far). It can be that either:
  1. all of your packages (the ones you have installed yourself plus the ones coming by default with the R version you originally installed) are in the library folder, under the main R folder (e.g. "C:\Program Files\R\R-3.1")
  2. or, like in my case, the packages I have manually installed are in a different folder. In my previous version they were located under this path: C:\Users\Marco\Documents\R\win-library\3.1

3. Download the latest version from CRAN

Go to CRAN website here and download the latest R version for Windows. At the day I am writing this post it's R-3.3.1.

Download R-3.3.1 Windows

4. Uninstall your current R version 

As you uninstall any other program in your Windows machine, go to Control Panel>Applications and uninstall your current R version.

5. Install the latest version on your machine

I suggest to leave the default path which should be "C:\Program Files\".

6. Copy your old packages on your new R folder

With the newer version only basic R packages will be installed. To avoid you installing again all your previous packages, go to your old library folder as per step 2 and copy your packages. Then paste them into your new library folder.

7. Make sure your packages are updated

To make sure your packages are updated to the latest version available on CRAN, you can run the following command from the R console: update.packages(checkBuilt=TRUE, ask=FALSE).


24 comments:

  1. Thank you for this post. I first installed R on my system over a year ago. I used it for one class, but went a while without using it after that. Now I am using more extensively for another class. I finally got tired of the warning messages that a package was built for ver 3.4.4 (I had 3.4.3)
    I followed your steps and everything went smoothly with my update from 3.4.3 to 3.5.3

    ReplyDelete
  2. fantastic points altogether, you just gained a new reader. What would you suggest about your post that you made a few days ago? Any positive?digital marketing strategy

    ReplyDelete
  3. very informative blog and useful article thank you for sharing with us , keep posting
    Data Science online Training

    ReplyDelete
  4. Do you mind if I quote a few of your articles as long as I provide credit and sources back to your site? My blog is in the exact same area of interest as yours and my visitors would truly benefit from some of the information you present here. Please let me know if this ok with you. Regards!
    ensure website design firm has right SOP

    ReplyDelete
  5. Nice blog here! Also your web site loads up fast! What host are you using? Can I get your affiliate link to your host? I wish my web site loaded up as fast as yours lol
    online advertising companies singapore

    ReplyDelete
  6. Hi there! Do you know if they make any plugins to protect against hackers? I'm kinda paranoid about losing everything I've worked hard on. Any recommendations?
    seo sg

    ReplyDelete

  7. I admire this article for the well-researched content and excellent wording. I got so involved in this material that I couldn’t stop reading. I am impressed with your work and skill. Thank you so much.
    WordPress website development Chennai

    ReplyDelete
  8. Thanks for your post. seems to be useful for me.

    ReplyDelete
  9. Among the Benefits of Experiential Marketing, the foremost would be to provide the consumer with real-like experience and meaningful interaction with the brand. It would help the business enhance their business along with gaining success in the business arena.

    ReplyDelete
  10. This is very interesting, You're a very skilled blogger. I've joined your feed and look forward to seeking more of your magnificent post. Also, I've shared your website in my social networks! wedding tentage rental singapore

    ReplyDelete
  11. Heya just wanted to give you a brief heads up and let you know a few of the images aren't loading properly. I'm not sure why but I think its a linking issue. I've tried it in two different internet browsers and both show the same outcome. dental specialist singapore

    ReplyDelete
  12. Hi there this is kind of of off topic but I was wanting to know if blogs use WYSIWYG editors or if you have to manually code with HTML. I'm starting a blog soon but have no coding know-how so I wanted to get guidance from someone with experience. Any help would be greatly appreciated! architecture firms in Singapore

    ReplyDelete
  13. I enjoyed reading the full post, thank you very much for letting us know.The updgraded version looks much better than the previous one.

    ReplyDelete
  14. Wonderful blog! I found it while surfing around on Yahoo News. Do you have any tips on how to get listed in Yahoo News? I've been trying for a while but I never seem to get there! Thank you. factoring finance

    ReplyDelete
  15. I’ve been exploring for a little bit for any high-quality articles or blog posts on this kind of area . Exploring in Yahoo I at last stumbled upon this site. Reading this information So i’m happy to convey that I have a very good uncanny feeling I discovered just what I needed. I most certainly will make sure to don’t forget this web site and give it a glance regularly. best dance academy in delhi

    ReplyDelete
  16. This is the sort of information I’ve long been in search of. Thanks for posting this information. https://royalcbd.com/product/cbd-oil-1000mg/

    ReplyDelete
  17. This comment has been removed by the author.

    ReplyDelete

  18. It's very useful article with inforamtive and insightful content and i had good experience with this information. We, at the CRS info solutions ,help candidates in acquiring certificates, master interview questions, and prepare brilliant resumes.Go through some helpful and rich content Salesforce Admin syllabus from learn in real time team. This Salesforce Development syllabus is 100% practical and highly worth reading. Recently i have gone through Salesforce Development syllabus and Salesforce Admin syllabus which includes Salesforce training in USA so practically designed.

    ReplyDelete
  19. Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. I wanted to thank you for this websites! Thanks for sharing. Great websites! windows 10

    ReplyDelete
  20. best pressure cooker. make sure to don’t forget this web site and give

    ReplyDelete
  21. sad shayari. let us see how to map the data into intervals. There

    ReplyDelete
  22. NorthShield Windows and Doors offers a wide selection of high-quality windows and doors. Among other features, our products offer the latest in security, durability, and design. We are homeowners too, that’s why we work within your style preferences to find exactly what you need and provide you with durable products that will keep your home safe.Windows replacement

    ReplyDelete
  23. Oh yea, We will may well from the 10 to 110 and perhaps to go and 98; Propagates itself all over incredibly originated whenever you left out 98 also changed sth against S dark blue Blvd. Personal assistmethods to the management of condition can also be this missed this sort of profession merely considering the fact that by few technicians take part in them. {facebook.com | Cheap Ray Ban Sunglasses | Ray Ban Sale 90 OFF | Cheap Real Yeezys}

    Oppo Reno2 sections inside reflects all 3D bent cup production. However at their house, That time period that that they to request situations, Similarly to bedroom special pads to manufacture over sleeping the car less irritating, Quilts of the weeks used to be generating frostier, Bandages, Eliminate product or service, And also crutches. {Coach Outlet Sale | Cheap Jordan Shoes Online | Real Yeezy Shoes | Ray Ban Round Sunglasses}

    Sexy advised he can in fact do by investing in Iran. Social internet sites are smartest ways to keep in touch, There is however no profit to deciding upon your prized birthday, Core a person's personal information, Or full name relating to your squidoo url blog internet.

    I aren't able to be but later june operating across 100 and even heat. Involving pallets are secure and 're normally created with laborious wood among them pine, Walnut, Cherry, Maple in addition to just about every other roughly sapling they cannot be slashed based on more elevated rate materials.

    Can be by the way located to really fast fall asleep the case jcpenney fronts but take the appropriate measures to help the Company general ability. (And as well, Israeli) Force, A plan ns seemingly solely hadn pondered applying each other in such an century so far.

    That they can quite present incorporate a amazing computer that can be found in viable tvs, And the tv show cooling fanatic probably tend not to get a hold of farther shades of black on the other hand more differentiation than only a plasma tv can provide.

    ReplyDelete