【R语言的安装】官网:https://www.r-project.org/

  在Ubuntu上的安装一般都有两种方式:

  1、直接到官网上下载安装包(tar.gz),然后依次安装即可。

  2、在网速可以的情况下,利用在apt-get安装是一种更为方便的方式:

  命令如下:

sudo apt-get install r-base
  接下来步骤完全自动完成!

  如果安装失败,可以先添加软件源,然后再安装,如下:

复制代码
sudo gedit  /etc/apt/sources.list
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu natty main
deb-src http://extras.ubuntu.com/ubuntu natty main
deb http://archive.canonical.com/Ubuntu maverick partner
deb-src http://archive.canonical.com/Ubuntu maverick partner
deb http://ftp.ctex.org/mirrors/CRAN/bin/linux/ubuntu maverick/(添加这一行)
# 更新软件源:
sudo apt-get update
sudo apt-get install r-base
Logo

更多推荐