linux 系统中可以这样安装指定版本的R
软件包安装:
001、系统
[root@localhost test01]# cat /etc/redhat-release ## 系统 CentOS Linux release 8.4.2105
。
002、安装epel软件源
[root@localhost test01]# yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
。
003、设置R版本环境变量:
[root@localhost test01]# export R_VERSION=4.3.2 ## 设置R版本环境变量
。
004、下载R rpm安装包
[root@localhost software]# curl -O https://cdn.rstudio.com/r/centos-8/pkgs/R-${R_VERSION}-1-1.x86_64.rpm
## 下载R rpm安装包
005、安装 R rpm安装包
[root@localhost software]# yum install -y R-${R_VERSION}-1-1.x86_64.rpm ## 安装R rpm安装包
006、默认的安装目录为 :
/opt/R/4.3.2
007、修改环境变量
[root@localhost test01]# ln -s /opt/R/${R_VERSION}/bin/R /usr/local/bin/R ## 修改环境变量
[root@localhost test01]# ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/local/bin/Rscript
008、调用测试
[root@localhost test01]# R R version 4.3.2 (2023-10-31) -- "Eye Holes" Copyright (C) 2023 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.
。
reference:
01、https://mp.weixin.qq.com/s?__biz=MzI2MjA1MDQxMg==&mid=2649718839&idx=2&sn=1ebe4cad90fae784b66ffac6281ccf1d&chksm=f24a2734c53dae22a6c9624f9e161a2d60508d37ff28fd5ffdcb07d418cbf830225259159d10&mpshare=1&scene=23&srcid=0403Njio80AX7YtrZsMKcxfO&sharer_shareinfo=f58426efec75ba0383ef2e266035f1d5&sharer_shareinfo_first=f58426efec75ba0383ef2e266035f1d5#rd
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
2023-04-04 R语言中绘图,将图例设置在绘图区域之外
2022-04-04 ubuntu中 putty连接出现 network error. connection refused
2022-04-04 ubuntu中安装gcc c++编译器
2022-04-04 Peer reports incompatible or unsupported protocol version.
2022-04-04 cache.h:40:18: fatal error: zlib.h: No such file or directory
2022-04-04 bash: git: command not found...
2022-04-04 linux 中实现每两列数据合并为一列数据