Report this

What is the reason for this report?

Como instalar o R no Ubuntu 20.04 Início [rápido]

Published on June 11, 2020
Português
Como instalar o R no Ubuntu 20.04 Início [rápido]

Introdução

R é uma linguagem de programação de código aberto, especializada em computação estatística e gráficos. Neste tutorial, instalaremos o R em um servidor Ubuntu 20.04.

Para uma versão mais detalhada deste tutorial, contendo explicações mais detalhadas para cada passo, confira Como instalar o R no Ubuntu 20.04.

Passo 1 — Adicionando a chave GPG

Logado em seu servidor Ubuntu 20.04 como um usuário sudo não root, adicione a chave GPG relevante.

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

Passo 2 — Adicionando o repositório do R

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

Se você não estiver usando a versão 20.04, encontre o repositório relevante da lista Ubuntu do projeto R, nomeada para cada versão.

Passo 3 — Atualizando as listas de pacotes

  1. sudo apt update

Passo 4 — Instalando o R

  1. sudo apt install r-base

Passo 5 — Testando a Instalação

Inicie o shell interativo do R como root.

  1. sudo -i R

Você deve receber um resultado similar ao seguinte:

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

Isso confirma que instalamos o R com sucesso e entramos em seu shell interativo.

Tutoriais relacionados

Alguns links para tutoriais mais detalhados relacionados a este guia.

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

Learn more about our products

About the author

Lisa Tagliaferri
Lisa Tagliaferri
Author
See author profile

Community and Developer Education expert. Former Senior Manager, Community at DigitalOcean. Focused on topics including Ubuntu 22.04, Ubuntu 20.04, Python, Django, and more.

Still looking for an answer?

Was this helpful?


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!

Creative CommonsThis work is licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 4.0 International License.
Join the Tech Talk
Success! Thank you! Please check your email for further details.

Please complete your information!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.