code/R

Linux에서 R설치하기(for Ubuntu)

쏘오금 2022. 12. 29. 16:57

 

오늘의 할일

 ubuntu R 설치하는 법 알아보기

 

https://cran.r-project.org/index.html

 

The Comprehensive R Archive Network

 

cran.r-project.org

 

각자의 환경에 맞는 R 선택하기

 

 

Install R

우분투 터미널을 켜서 install R 부분의 코드를 야금야금 따라하면 된다.

 

# update indices
sudo apt update -qq
# install two helper packages we need
sudo apt install --no-install-recommends software-properties-common dirmngr
# add the signing key (by Michael Rutter) for these repos
# To verify key, run gpg --show-keys /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc 
# Fingerprint: E298A3A825C0D65DFD57CBB651716619E084DAB9
wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
# add the R 4.0 repo from CRAN -- adjust 'focal' to 'groovy' or 'bionic' as needed
sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"

 

설치 확인은 

sudo -i R

Ubuntu에 R 설치 끝