先下载 conda 教程见conda管理生信软件一文就够 (qq.com)
Index of /anaconda/miniconda/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py39_4.9.2-Linux-x86_64.sh --no-check-certificat
bash Miniconda3-py39_4.9.2-Linux-x86_64.sh #直接安装
bash Miniconda3-py39_4.9.2-Linux-x86_64.sh -u #更新安装
conda --help #help文档出来就说明安装成功
conda info --envs #查看目前的conda环境
conda create -n R4.2 #创建名为R4.2的环境
source activate R4.2 #激活R4.2环境
conda search r # 在conda里寻找R
conda install r-base #注意r-base之间没有空格 安装最新版本R
conda install r=4.2.2 #安装指定版本R,conda install r=4.2 这句命令安装的是R4.2.3
conda uninstall r-base #删除
安装devtools包时遇到以下报错:
Warning messages:
1: In install.packages("devtools") :
installation of package ‘ragg’ had non-zero exit status
2: In install.packages("devtools") :
installation of package ‘pkgdown’ had non-zero exit status
3: In install.packages("devtools") :
installation of package ‘devtools’ had non-zero exit status
退出R,在shell中直接安装这些相关包,例如:
conda install r-ragg