Ubuntu下安装R

众所周知,R是一种功能非常强大的数据处理分析软件,并且可以很快的作出非常好看的图。R集成平台拥有非常的多的R包,使得很多数据处理变得异常的简洁,是生物信息学习者最常用的软件。

R更新速度较快,最新的稳定版本并不总是在Ubuntu的软件库,所以我们将开始通过添加由CRAN维护的外部软件库:我们使用下面的key,可以确保来源是从CRAN在其自己网络服务器,确保来源的安全性。

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

执行结果:

Executing: /tmp/apt-key-gpghome.D6xhif9qSe/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

gpg: key 51716619E084DAB9: public key "Michael Rutter <marutter@gmail.com>" imported

gpg: Total number processed: 1

gpg:              imported: 1



添加软件来源:

sudo apt-get update

如果输出结果没有报错,那么我们已经成功添加了软件库,这样可以确保我们安装的是最新的版本

下面我们开始安装R:

sudo apt-get install r-base

如果报错可以使用下面语句重新安装即可解决问题。

sudo apt install r-base-core

      在写这篇文章的时候,CRAN的最新稳定版本是在3.3.2,这是打开使用R时,这些信息都会显示出来的.由于我们计划该系统的所有用户都可以使用R,我们将以root用户启动R,以便自动供所有用户使用。

  启动 R:

   sudo -i R

  输出结果:

R version 3.4.4 (2018-03-15) -- "Someone to Lean On"

Copyright (C) 2018 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.

>


参考资料:

https://blog.csdn.net/wzgl__wh/article/details/53440607

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容