1. R 설치
sudo apt update -qq
sudo apt install dirmngr gnupg apt-transport-https ca-certificates software-properties-common
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
lsb_release -a
sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/"
sudo apt install r-base r-base-dev
R --version
sudo apt-get install gdebi-core
sudo wget https://download2.rstudio.org/server/jammy/amd64/rstudio-server-2023.12.1-402-amd64.deb
sudo gdebi rstudio-server-2023.12.1-402-amd64.deb
서버에서 방화벽 설정 allow 8787
sudo rstudio-server status
sudo rstudio-server verify-installation
-working diretory 설정
터미널에서 mkdir rstudio_ex
상단메뉴를 이용하여 Session > Set Working Directory > Choose Directory.
3. 한글깨지는 것방지
$ cd /usr/share/fonts
$ sudo wget http://cdn.naver.com/naver/NanumFont/fontfiles/NanumFont_TTF_ALL.zip
$ sudo unzip NanumFont_TTF_ALL.zip -d NanumFont
$ sudo rm -f NanumFont_TTF_ALL.zip
$ fc-list :lang=ko
R 콘솔에서
library(sysfonts) # 없다면 install.packages("sysfonts")
font_add("NanumGothicBold","/usr/share/fonts/NanumFont/NanumGothicBold.ttf")
par(family="NanumGothicBold")
우상단 전원버튼으로 재시작 확인
plot(c(1:5), main="가나다")
댓글 없음:
댓글 쓰기