본문 바로가기

R

우분투에 R 최신 버전 설치 및 R 버전 업그레이드

우분투에서 R 최신 버전 설치 방법입니다.

기존 R이 깔려져 있더라도, 다음 방법을 통해 R 버전을 최신 버전으로 업그레이드 할 수 있습니다.

$ sudo apt update -qq
# 필요한 두 헬퍼 패키지 설치
$ sudo apt install --no-install-recommends software-properties-common dirmngr
# signing key 추가
$ 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
# CRAN에서 R4.0 repo 추가
$ sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"

위의 과정을 마친 후 설치를 진행합니다.

$ sudo apt install --no-install-recommends r-base

 

설치된 R 버전 확인은 다음을 통해 할 수 있습니다.

$ R --version

 R 실행은

$ R

 

[참고자료]

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

 

The Comprehensive R Archive Network

 

cran.r-project.org