R语言是统计编程语言,统计计算和图形。 R输入语言为我们提供各种各样的统计和图形技术,并且是高度可扩展的。 本文将帮助你安装Ubuntu系统上R语言程序。
添加存储库:
要安装最新的R程序包在
/etc/apt/sources.list文件中按你的Ubuntu版本添加下面的存储库。
Ubuntu 15.04
deb http://cran.rstudio.com/bin/linux/ubuntu vivid/
Ubuntu 14.10
deb http://cran.rstudio.com/bin/linux/ubuntu utopic/
Ubuntu LTS 14.04
deb http://cran.rstudio.com/bin/linux/ubuntu trusty/
Ubuntu LTS 12.04
deb http://cran.rstudio.com/bin/linux/ubuntu precise/
安装 R 包:
新增第一签名密钥使用以下命令的软件包。
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
现在使用下面的命令安装R包。
$ sudo apt-get update
$ sudo apt-get install r-base r-base-dev
访问R控制台:
此时,您已经成功地在系统上安装R语言输入包。 R型得到控制台访问。
rahul@youcl.com:~$ R
R version 3.2.1 (2015-06-18) -- "World-Famous Astronaut"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
>