用conflicted包解决
参考:https://blog.csdn.net/qazplm12_3/article/details/119621588
#1 安装软件包
install.packages("conflicted")
#2 显示冲突的包
library(conflicted)
conflict_scout()
#3 设置优先使用的包的函数(例如上述的`filter()`: dplyr and stats冲突)
# 优先使用dplyr里面的filter函数
conflict_prefer("filter", "dplyr")
#4 其他
conflict_prefer("filter", "dplyr")
conflict_prefer("arrange", "dplyr")
conflict_prefer("compact", "dplyr")
conflict_prefer("count", "dplyr")
conflict_prefer("desc", "dplyr")
conflict_prefer("failwith", "dplyr")
conflict_prefer("id", "dplyr")
conflict_prefer("lag", "dplyr")
conflict_prefer("mutate", "dplyr")
conflict_prefer("rename", "dplyr")
conflict_prefer("summarise", "dplyr")
conflict_prefer("summarize", "dplyr")
标签:优先,dplyr,--,prefer,filter,conflicted,conflict
From: https://www.cnblogs.com/corrschi/p/18138975