更新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版本

相关推荐
Yeats_Liao11 小时前
遗留系统微服务改造(四):从单体到微服务的演进之路
运维·微服务·架构
2301_7931679911 小时前
网络管理部分
linux·运维·服务器·网络·php
序属秋秋秋11 小时前
《Linux系统编程之入门基础》【Linux的前世今生】
linux·运维·服务器·开源·unix·gnu
qiuiuiu41311 小时前
正点原子RK3568学习日记-GIT
linux·c语言·开发语言·单片机
搬砖的小码农_Sky11 小时前
Windows操作系统上`ping`命令的用法详解
运维·网络·windows
Janspran13 小时前
监控系统4 - LVGL | sqlite3 | mqtt
linux·sqlite3·嵌入式实时数据库
敲上瘾13 小时前
Docker镜像构建指南:Dockerfile语法与docker build命令全解析
linux·服务器·docker·微服务·容器
YC运维17 小时前
Dockerfile实战案例详解
运维·docker·容器
一个响当当的名号18 小时前
一些主要应用和NAT
运维·服务器·网络
@小博的博客18 小时前
【Linux探索学习】第二篇Linux的基本指令(2)——开启Linux学习第二篇
linux·运维·学习