signature=17f63c9598a5255302559592176671df,Error in (function (classes, fdef, mtable) : unable to fi...

在R语言4.0.0版本更新后,用户遇到使用dplyr包的select函数时出现错误,提示无法找到适用于'spec_tbl_df'类的继承方法。解决方案可能是使用dplyr::select来确保调用的是正确命名空间的方法。
摘要由CSDN通过智能技术生成

问题

I am having this error code appear on in my project.

the strange thing is, the piece of code I am using was working perfectly earlier today. However, since I installed an update for R I am now getting this message when running it.

df1 % select(Month, Longitude, Latitude, Type)

Error in (function (classes, fdef, mtable) :

unable to find an inherited method for function ‘select’ for signature ‘"spec_tbl_df"’

The code was used simply to create a new data frame with only the selected columns.

Any help would be greatly appreciated!

回答1:

A new version of R has recently been released: 4.0.0.

There has been some major changes, see here for a list. The documentation says that this might have broken some methods that were based on R 3.6.* behavior. Maybe the method for the class spec_tbl_df was relying on something that changed.

That's a clue more than a definitive answer, maybe some users will give you a better one

Update

Given the issue here, it looks like there exists a conflict between the base R select method and dplyr::select method for objects of class spec_tbl_df. In that case, the easiest solution is to ensure you use dplyr namespace by using the dplyr::select syntax.

来源:https://stackoverflow.com/questions/61428168/error-in-function-classes-fdef-mtable-unable-to-find-an-inherited-method

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值