Report this

What is the reason for this report?

Installieren von R unter Ubuntu 20.04 [Schnellstart]

Published on June 11, 2020
Deutsch
Installieren von R unter Ubuntu 20.04 [Schnellstart]

Einführung

Die Open-Source-Programmiersprache R ist auf statistische Datenverarbeitung und Grafik spezialisiert. In diesem Tutorial installieren wir R auf einem Ubuntu 20.04-Server.

Eine ausführlichere Version dieses Tutorials mit genaueren Erklärungen zu den einzelnen Schritten finden Sie unter Installieren von R unter Ubuntu 20.04.

Schritt 1 — Hinzufügen des GPG-Schlüssels

Melden Sie als sudo Nicht-root-Benutzer auf Ihrem Ubuntu 20.04-Server an und fügen Sie den entsprechenden GPG-Schlüssel hinzu.

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

Schritt 2 — Hinzufügen des R Repository

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

Wenn Sie 20.04 nicht nutzen, finden Sie das entsprechende Repository in der R Projekt Ubuntu Liste, das nach der Version benannt ist.

Schritt 3 — Aktualisieren von Paketlisten

  1. sudo apt update

Schritt 4 — Installieren von R

  1. sudo apt install r-base

Schritt 5 – Testen der Installation

Starten Sie die interaktive Shell von R als root.

  1. sudo -i R

Sie erhalten eine Ausgabe, die etwa folgendermaßen aussieht:

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

Damit ist bestätigt, dass wir R erfolgreich installiert und seine interaktive Shell eingegeben haben.

Relevante Tutorials

Hier sind Links zu ausführlicheren Tutorials, die für diesen Leitfaden relevant sind:

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.