使用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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM