intellij idea安装R包ggplot2报错问题求解

1、intellij idea安装R包ggplot2问题

在我上次解决图形显示问题后,发现安装ggplot2包时出现了问题,这在之前高版本中并没有出现问题,

install.packages('ggplot2')
ERROR: lazy loading failed for package 'lifecycle'
* removing 'C:/Users/VICTUS/Documents/R/win-library/4.0/lifecycle'
Warning in install.packages("ggplot2") :
  installation of package ‘lifecycle’ had non-zero exit status
ERROR: dependency 'lifecycle' is not available for package 'gtable'
* removing 'C:/Users/VICTUS/Documents/R/win-library/4.0/gtable'
Warning in install.packages("ggplot2") :
  installation of package ‘gtable’ had non-zero exit status
ERROR: dependencies 'gtable', 'lifecycle' are not available for package 'ggplot2'
* removing 'C:/Users/VICTUS/Documents/R/win-library/4.0/ggplot2'
Warning in install.packages("ggplot2") :
  installation of package ‘ggplot2’ had non-zero exit status

The downloaded source packages are in
	‘C:\Users\VICTUS\AppData\Local\Temp\Rtmp6Hd81s\downloaded_packages’

但是在高版本r语言中并没有出现此问题,为此:

为了使intellij idea显示图片,降级r语言,但是安装r包时候出现问题;

为了安装包不出问题,升级r语言版本,可是图像显示又出现了问题。

 

在查找了大量资料后发现这是两者接入的bug问题,官方仍在修复,所以为了舒适使用R语言编写代码,使用RStudio是不错的选择。

1aff19e2281c44c2b0392845e8845b13.png

2、在RStudio中运行正常显示

在RStudio中打开文件,运行,发现一切正常。

03bd93a463fa4dd4b054323b46276e2c.png

结果可以准确输出。

安装r包:


 install.packages("pak")

c4ced8046cf44fbb95d8c67cd23cdf63.png

可见r包也是正常安装。

所以,为了更好的r语言体验,使用RStudio进行编写可以很好的避免上述问题。

 

 

  • 9
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

卡卡_R-Python

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值