如何在Ubuntu 18.04上安装R [快速入门]

news/2024/7/3 20:27:42

介绍 (Introduction)

R is an open-source programming language that specializes in statistical computing and graphics. In this tutorial, we will install R on an Ubuntu 18.04 server.

R是一种开源编程语言,专门研究统计计算和图形。 在本教程中,我们将在Ubuntu 18.04服务器上安装R。

For a more detailed version of this tutorial, with better explanations of each step, please refer to How To Install R on Ubuntu 18.04.

有关本教程的更详细版本,以及每个步骤的更好说明,请参阅如何在Ubuntu 18.04上安装R。

第1步-添加GPG密钥 (Step 1 — Add GPG Key)

Logged into your Ubuntu 18.04 server as a sudo non-root user, add the relevant GPG key.

以sudo非root用户身份登录到Ubuntu 18.04服务器,添加相关的GPG密钥。

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

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

第2步-添加R存储库 (Step 2 — Add the R Repository)

  • sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/'

    sudo add-apt-repository'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40 /'

If you’re not using 18.04, find the relevant repository from the R Project Ubuntu list, named for each release.

如果您未使用18.04,请从R Project Ubuntu列表 (为每个版本命名)中找到相关的存储库。

步骤3 —更新软件包列表 (Step 3 — Update Package Lists)

  • sudo apt update

    sudo apt更新

步骤4 —安装R (Step 4 — Install R)

  • sudo apt install r-base

    sudo apt安装r-base

If prompted to confirm installation, press y to continue.

如果提示您确认安装,请按y继续。

第5步-测试安装 (Step 5 — Test Install)

Start R’s interactive shell as root.

以root身份启动R的交互式shell。

  • sudo -i R

    须藤-i R

You should receive output similar to the following:

您应该收到类似于以下内容的输出:


   
Output
R version 4.0.0 (2020-04-24) -- "Arbor Day" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) ... 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. >

This confirms that we’ve successfully installed R and entered its interactive shell.

这确认我们已经成功安装了R并进入了它的交互式外壳。

翻译自: https://www.digitalocean.com/community/tutorials/how-to-install-r-on-ubuntu-18-04-quickstart


http://www.niftyadmin.cn/n/3648186.html

相关文章

Google未来半年内的杀手锏预测

Google未来半年内的杀手锏预测郑昀 20060925麦田提出了他的预测《:大胆猜测google中国未来半年的“杀手锏”--麦田的读书生活》。我的基本观点如下:1: google ig没戏,除非上来就有大量信息可供选择; 2: 社区搜索是必定要做的; 3: …

Web2.0的大格局与高壁垒

郑昀 观点 20060927昨天千橡陈一舟针对裁人痛定思痛说:“一定要做大事,做适合大公司做的事情。大事情指超过30-40% 互联网用户都需要的产品,大事情能够撑得起上市公司 ,能支撑好几家上市公司。小事情指不超过5%互联网用户需要的产…

Node.js应用实战和工作原理解析

Node.js是一个基于Chrome JavaScript运行时建立的开发平台, 用于方便地搭建响应速度快、易于扩展的网络应用。Node.js 使用事件驱动,非阻塞I/O模型而得以轻量和高效,非常适合在分布式设备上运行数据密集型的实时应用,例如移动应用…

ubuntu16.04挂载_如何在Ubuntu 20.04上设置NFS挂载

ubuntu16.04挂载介绍 (Introduction) NFS, or Network File System, is a distributed file system protocol that allows you to mount remote directories on your server. This lets you manage storage space in a different location and write to that space from multip…

郑昀邀请开发(PHP/ASP.NET/C#/Java/C++)人才加盟etone[工作地点:北京]

我的公司最近不断地扩充团队,无奈通过公开媒体的招聘启事收到的技术类人才偏少,只好在我的blog里吆喝吆喝:希望优秀的Web开发人员加盟!我是谁?点击这里了解一下。2005年度CSDN十大最热门BLog作者排名第一; …

如何在Ubuntu 20.04上安装MariaDB

介绍 (Introduction) MariaDB is an open-source relational database management system, commonly used as an alternative for MySQL as the database portion of the popular LAMP (Linux, Apache, MySQL, PHP/Python/Perl) stack. It is intended to be a drop-in replace…

做公司谈创业,不是你有点技术就行的

zhengyun_ustc 2006/9/10做公司谈创业,不是你有点技术就行的。通常小孩子们有一种误区,以为自己能写出几个说得过去的项目,就自大到认为自己够格做公司了。当年的吉利老总李书福最开始造车的时候,就沾沾自喜地说,造车不…

XSD文件详解

XSD (xml Schema Definition) XSD即XML结构定义, XML Schemas Definition。其本身就是用xml描述的, 且遵循xml语法规则。一份XML schema文件描述了XML文档的结构. 基本规则: .必须以 XML 声明开头 .必须拥有唯一的根元素 .标签必须与结束标…