r - R 包 dplyr 中的主要功能对我不起作用
问题描述
library(dplyr)
x <- 1:10
lead(x)
运行上面的代码只会给我以下错误:
"UseMethod("lead") 中的错误:没有适用于 'lead' 的方法应用于类 "c('integer', 'numeric')" 的对象
我已经尝试了很多类似 as.numeric 和 as.vector 的东西,但我一直收到这个错误。
解决方案
推荐阅读
- c# - 在编辑或更新时获取选定的角色
- python - 更新除第 i 个条目外的 numpy 数组
- python - 如何将 pytorch 整数张量转换为布尔张量?
- javascript - 外部 JavaScript 标签如何访问另一个 js 文件功能?
- c# - C#抽象类不能创建实例
- python - TypeError: __init__() 至少需要 3 个参数(给定 5 个) Keras
- java - Java Array 删除最后存储的元素
- javascript - 通过将鼠标悬停在子菜单上进行选择时下拉菜单消失
- python - 使用列表中的值更新字典中的值
- vb.net - 如何查询本地数据表并将信息返回到 VB.net 中的数据表