在Ubuntu上是不能直接通过 sudo apt-getinstall r-base的方式安装最新版本的R,直接运行的结果是安装R-3.4版本。这是因为官方说这是比较稳定的版本,所以除非它的维护期结束,否则求稳
R 3.4 packages for Ubuntu on i386 and amd64 are available for all stable Desktop releases of Ubuntu prior to Bionic Beaver (18.04) until their official end of life date. However, only the latest Long Term Support (LTS) release is fully supported. As of November 18, 2018 the supported releases are Xenial Xerus (16.04; LTS), and Trusty Tahr (14.04; LTS).
那么问题来了,如何在Ubuntu上安装比较新版本的R呢?这里推荐三种方法,给不同级别的人使用。
方法一: 首先介绍最简单的方法,也就是使用conda进行安装。使用 conda search r-base在conda的频道中检索,
...
r-base 3.5.1 hfb2a302_1009 anaconda/cloud/conda-forge
r-base 3.5.1 hfb2a302_1010 anaconda/cloud/conda-forge
r-base 3.6.0 hce969dd_0 pkgs/r
r-base 3.6.1 h6e652e1_3 anaconda/cloud/conda-forge
r-base 3.6.1 h8900bf8_0 anaconda/cloud/conda-forge
<