更新R版本到4.xxx

python 复制代码
conda create -n r4-base
conda activate r4-base
conda config --add channels conda-forge
conda install -c conda-forge r-base #或者 conda install -c conda-forge r-base=4.1.3

安装后进入R环境

python 复制代码
R

结果仍然是3.xxx版本

python 复制代码
(r4-base) /mnt/workspace/wzf> R

R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

怀疑是新安装的R没有添加到路径中

查看R环境:

python 复制代码
(r4-base) /mnt/workspace/wzf> whereis R
R: /usr/bin/R /usr/lib/R /etc/R /usr/local/lib/R /usr/share/R /home/pai/envs/r4-base/bin/R

查看路径:

python 复制代码
echo $PATH

果然不在路径中,将/home/pai/envs/r4-base/bin/R添加到路径

python 复制代码
r4-base) /mnt/workspace/wzf> export PATH="/home/pai/envs/r4-base/bin:$PATH"

重新进入R环境,成功变成4.xxx版本

相关推荐
书生执笔画浮沉9 分钟前
rpmrebuild
linux·centos·rpm
志栋智能1 小时前
超自动化巡检:驱动运维团队从操作走向优化
运维·服务器·自动化
乌托邦的逃亡者2 小时前
Dockerfile的配置和使用
linux·运维·docker·容器
小此方2 小时前
Re:Linux系统篇(三)指令篇 · 二:十二个高频指令精讲+重定向操作+“一切皆文件“深入理解
linux·运维·服务器
十五年专注C++开发2 小时前
MobaXterm:Windows 远程工作全能工具箱
linux·windows·mobaxterm
wohehe2 小时前
Android项目工程化-Github Actions
linux·github
用户1401056775192 小时前
线上接口偶发超时,最后发现是 conntrack 打满:一次网络故障排查实战
运维
以太浮标3 小时前
华为eNSP模拟器综合实验之- 主机没有配置缺省网关时,通过路由式Proxy ARP实现通信(arp-proxy enable)
运维·网络·网络协议·华为·智能路由器·信息与通信
REDcker3 小时前
Linux disown命令详解 后台作业脱管与终端退出
linux·运维·chrome
cyber_两只龙宝3 小时前
【Oracle】Oracle之SQL的转换函数和条件表达式
linux·运维·数据库·sql·云原生·oracle