使用Miniconda安裝R語言環境

使用Miniconda安裝R語言

  1. 下載Miniconda3-latest-Linux-x86_64.sh

  2. 靜默安裝 sh Miniconda3-latest-Linux-x86_64.sh -b -p /opt/mids/Miniconda3-Rlang

  3. 激活conda環境:/opt/mids/Miniconda3-Rlang/bin/conda init

  4. 配置鏡像(可選,如下載安裝慢,可更改鏡像源)

    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 -
    
  5. 安裝R:conda install R

  6. conda search PACKAGENAME:運行命令查找是否存在

  7. 安裝R依賴包rjson:conda install -c conda-forge -y r-rjson

  8. 安裝R依賴包Rserve:conda install -c conda-forge -y r-rserve

  9. 安裝R依賴包ggplot2:conda install -c conda-forge -y r-ggplot2

  10. 安裝R依賴包stringi:conda install -c conda-forge -y r-stringi

  11. 安裝R依賴包rJava:conda install -c conda-forge -y r-rjava

  12. 安裝R依賴包Marix:conda install -c conda-forge -y r-matrix

  13. 安裝R依賴包forecast:conda install -c conda-forge -y r-forecast

  14. 查看已經安裝的包,進入R:installed.packages()

  15. 清理緩存和安裝包:conda clean -y -a

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章