查看原文
其他

Windows用户如何无痛升级R

Y叔 biobabble 2020-02-05


《R-3.5.0发布,又该升级了》,想起了我在2015年3月份的时候给实验室的小伙伴介绍怎么较为无痛地升级R,为了写这个邮件,我还专门在虚拟机里装了XP,并截屏,也是满满的诚意!截屏虽然是3年前,但依然是适用的!点点鼠标,搞定升级!


Rtools is a set of compiling tools that is necessary to compile packages that contain for example, C/C++ or Fortran codes.  Mostly, We don't need rtools, since most of the packages will be installed via binary form which was already compiled.

It is no harm to install rtools, and you may want to install one in case it is needed. I would like to introduce you the installr package, http://cran.r-project.org/web/packages/installr/index.html.

We can install it via install.packages command as usual. 



With this package, it is very easy to update R using the updateR() command. After R is updated, it will move all your installed packages to the library folder of new R, and update them to the newest version. There will be no pain in R upgrading.


AND of course, you can use install.Rtools() to install Rtools. It may throw error at the first time if you don't have XML package installed. XML package is needed to parse the Rtools webpage. If XML is not installed in your R, use install.packages("XML") to install it and run install.Rtools() again.
 


This package is only for Windows platform. For linux, we already have all the compiling tools and for Mac OS X, all we need is XCODE.

升级了R之后,记得使用《rvcheck大法,一条指令升级你所有R包哦》!

    您可能也对以下帖子感兴趣

    文章有问题?点此查看未经处理的缓存