Tutorial

Comment installer R sur Ubuntu 20.04 [Démarrage rapide]

Published on June 11, 2020
Français
Comment installer R sur Ubuntu 20.04 [Démarrage rapide]

Introduction

Langage de programmation à code source ouvert, R est spécialisé dans le calcul statistique et les graphiques. Dans ce tutoriel, nous allons installer R sur un serveur Ubuntu 20.04.

Pour une version plus détaillée de ce tutoriel, avec des explications plus approfondies sur chaque étape, veuillez vous référer à Comment installer R sur Ubuntu 20.04.

Étape 1 — Ajout de la clé GPG

Connecté à votre serveur Ubuntu 20.04 en tant qu’utilisateur sudo non root, ajoutez la clé GPG appropriée.

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

Étape 2 — Ajout du référentiel R

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

Si vous n’utilisez pas 20.04, trouvez le référentiel approprié dans la liste R Project Ubuntu, dont le nom est indiqué pour chaque version.

Étape 3 — Mise à jour des listes de paquets

  1. sudo apt update

Étape 4 — Installation de R

  1. sudo apt install r-base

Étape 5 - Testez l’installation

Lancez le shell interactif de R en tant que racine.

  1. sudo -i R

Vous devriez recevoir un résultat similaire à celui qui suit :

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

Cela confirme que nous avons installé R avec succès et que nous sommes entrés dans son shell interactif.

Tutoriels connexes

Voici des liens vers des tutoriels plus détaillés qui sont liés à ce guide :

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