R语言运行bug:
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘select’ for signature ‘“data.frame”’
描述问题:
常在使用dplyr包时出现这种情况:
data %>% separate(ID,c("ENSEMBL","drop"),sep="\.") %>% #删除ENSEMBL基因名后面的版本号
+ select(-drop) #整理获得ENSEMBL基因名,以备后续基因名转换
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘select’ for signature ‘"data.frame"’
分析问题:
分析可能是dplyr包和其他包冲突造成的,因此选择优先dplyr包的函数试试看。
解决方案:
具体解决方案:
#dplyr包经常和其他包的函数有冲突,需要选择一下优先级:
library(conflicted)
conflict_prefer(“filter”, “dplyr”)
conflict_prefer(“select”, “dplyr”)
conflict_scout()
#结果顺利运行



