最近更新把R版本更新至4.3.0版本。但是在使用ggsave函数保存图片时报错,一番资料的查找,得到解决。
我是在centOS系统上,使用miniconda 安装的R。
解决过程:
1、在Graphics API Version Mismatch Error with DESeq2 and ggplot2 in RStudio on Ubuntu 22.04中找到操作方法:
remove.packages("ragg")
library(BiocManager)
install("ragg")
2、在服务器上进行上述操作,遇到新的报错:make: x86_64-conda-linux-gnu-ar: Command not found
这个是参照另一篇文章得到解决:x86_64-conda-linux-gnu-cc not found,修改R/etc/Makeconf 中的AR 参数,x86_64-conda-linux-gnu-ar改为其绝对路径。
3、再次运行脚本,图片生成,无报错。