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