使用Miniconda安裝R語言
-
下載Miniconda3-latest-Linux-x86_64.sh
-
靜默安裝 sh Miniconda3-latest-Linux-x86_64.sh -b -p /opt/mids/Miniconda3-Rlang
-
激活conda環境:/opt/mids/Miniconda3-Rlang/bin/conda init
-
配置鏡像(可選,如下載安裝慢,可更改鏡像源)
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda conda config --set show_channel_urls yes conda config -
-
安裝R:conda install R
-
conda search PACKAGENAME:運行命令查找是否存在
-
安裝R依賴包rjson:conda install -c conda-forge -y r-rjson
-
安裝R依賴包Rserve:conda install -c conda-forge -y r-rserve
-
安裝R依賴包ggplot2:conda install -c conda-forge -y r-ggplot2
-
安裝R依賴包stringi:conda install -c conda-forge -y r-stringi
-
安裝R依賴包rJava:conda install -c conda-forge -y r-rjava
-
安裝R依賴包Marix:conda install -c conda-forge -y r-matrix
-
安裝R依賴包forecast:conda install -c conda-forge -y r-forecast
-
查看已經安裝的包,進入R:installed.packages()
-
清理緩存和安裝包:conda clean -y -a