在Linux服务器上配置R程序

一、Q1 安装包报错

直接用install.pakages(""),会报错:

installation of package had non-zero exit status
安装包有非零退出状态

ERROR: dependencies 'plyr', 'digest', 'gtable', 'reshape2', 'scales', 'proto' are not available for package 'ggplot2'

解决办法:

用这个install.packages("stringi", dependencies=TRUE, INSTALL_opts = c('--no-lock'))真的解决问题了,stringi包,其他包都可以用这个方法解决

二、Q2 某些包版本不支持

Warning: unable to access index for repository https://mirrors.eliteu.cn/CRAN/src/contrib:
  cannot open URL 'https://mirrors.eliteu.cn/CRAN/src/contrib/PACKAGES'
Warning message:
package ‘x12’ is not available (for R version 3.5.3) 


为避免这种情况,可以设置CRAN使用清华大学镜像,命令如下:

options(repos=structure(c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/"))) 

 安装好了就可以用library调用了。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值