百度
360搜索
搜狗搜索

Linux如何安装最新版本R语言详细介绍

在 Linux 系统上安装最新版本的 R 语言,不同的发行版有不同的安装方式,下面为你分别介绍在 Debian/Ubuntu 和 CentOS/RHEL 系统上的安装步骤。

在 Debian/Ubuntu 系统上安装

  1. 添加 CRAN 镜像
    打开终端,运行以下命令添加 CRAN 镜像源。bash
      update

    dirmngr gnupg apt-transport-https ca-certificates software-properties-common

    apt-key adv keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB

    add-apt-repository

    这里的 focal 指的是 Ubuntu 20.04,如果你使用的是其他版本,需要替换成对应的版本代号。

  2. 安装 R 语言:bash
      update

    r-base

在 CentOS/RHEL 系统上安装

  1. 添加 CRAN 镜像
    打开终端,运行以下命令添加 CRAN 镜像源。bash
     yum   https://dl.fedoraproject.org/pub/epel/epel-release-latest-  .noarch.rpm

    yum-config-manager --add-repo https://cloud.r-project.org/bin/linux/centos/R.repo

  2. 安装 R 语言:bash
     yum   R

验证安装

安装完成后,你可以在终端输入 R 来启动 R 语言环境,如果成功进入 R 环境,则表示安装成功。
bash

R

当看到类似下面的输出,就说明 R 语言已经成功安装并启动了。
plaintext

R version 4.x.x (202x-xx-xx) -- "Some Nice Title"

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

>




991234567891011121380081920R version 4.x.x (202x-xx-xx) -- "Some Nice Title"Copyright (C) 202x The R Foundation for Statistical ComputingPlatform: 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.

>

输入 q() 并回车即可退出 R 环境。

阅读更多 >>>  win10装linux虚拟机吗

网站数据信息

"Linux如何安装最新版本R语言"浏览人数已经达到15次,如你需要查询该站的相关权重信息,可以点击进入"Chinaz数据" 查询。更多网站价值评估因素如:Linux如何安装最新版本R语言的访问速度、搜索引擎收录以及索引量、用户体验等。 要评估一个站的价值,最主要还是需要根据您自身的需求,如网站IP、PV、跳出率等!