Tutorial

Установка R в Ubuntu 20.04. [Краткое руководство]

Published on June 11, 2020
Русский
Установка R в Ubuntu 20.04. [Краткое руководство]

Введение

Язык программирования с открытым исходным кодом R предназначен для статистических вычислений и графики. В этом обучающем модуле мы установим R на сервере Ubuntu 20.04.

Более детальный вариант настоящего руководства с подробным разъяснениями каждого шага можно найти в статье «Установка и настройка R в Ubuntu 20.04».

Шаг 1 — Добавление ключа GPG

Выполните вход на сервер Ubuntu 20.04. как пользователь sudo без прав root и добавьте соответствующий ключ GPG.

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

Шаг 2 — Добавление репозитория R

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

Если вы не используете версию 20.04, найдите репозиторий из списка R Project Ubuntu, где перечислены имена для каждого выпуска.

Шаг 3 — Обновление списков пакетов

  1. sudo apt update

Шаг 4 — Установка R

  1. sudo apt install r-base

Шаг 5 — Тестирование установки

Запустите интерактивную оболочку R с правами root.

  1. sudo -i R

Вы получите примерно следующий результат:

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. >

Это подтверждает, что мы успешно установили R и вошли в интерактивную оболочку.

Другие обучающие руководства

Здесь представлены ссылки на более подробные обучающие руководства, связанные с настоящим руководством:

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about us


About the authors

Still looking for an answer?

Ask a questionSearch for more help

Was this helpful?
 
Leave a comment


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Join the Tech Talk
Success! Thank you! Please check your email for further details.

Please complete your information!

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel