I am Charmie

メモとログ

Rのインストール

全然うまくいかなかったので,やり方を調べた このページを参考にした

手順1: パブリックキーを手動で取得

  • このページでファイルを取得
  • キーは0xE298A3A825C0D65DFD57CBB651716619E084DAB9
  • 表示されるファイルを保存 (lookup.txtとして保存)

手順2: キーを追加

$ cat lookup.txt | sudo apt-key add -
$ sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/'

手順3: r-baseをインストール

$ sudo apt update
$ sudo apt install r-base

手順4: Rのバージョンを確認

Rのバージョンが4.1以上になっていればOK.

$ R --version

R version 4.1.2 (2021-11-01) -- "Bird Hippie"
Copyright (C) 2021 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 the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
https://www.gnu.org/licenses/.

3.6などがインストールされている場合は,一度アンインストールしてからレポジトリを追加して再インストール

$ sudo apt purge --remove r-base
$ sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/'
$ sudo apt update
$ sudo apt install r-base