【发布时间】:2016-04-12 19:35:23
【问题描述】:
这很奇怪。我收到此错误
sort.list(y) 中的错误:对于“sort.list”,“x”必须是原子的
您是否在列表中调用了“排序”?
当我在列表上执行此代码时
cc3 <- as.data.frame(table(cc2))
可能有什么问题?
这是列表的开头。
head(cc2)
V1
1: 174
2: 174
3: 211
4: 177106
5: 177106
6: 177106
编辑:
当我跑步时,str(cc2)
我明白了
Classes ‘data.table’ and 'data.frame': 149706 obs. of 1 variable:
$ V1:List of 149706
..$ : Named chr "174"
.. ..- attr(*, "names")= chr "V11"
..$ : Named chr "174"
.. ..- attr(*, "names")= chr "V7"
..$ : Named chr "211"
.. ..- attr(*, "names")= chr "V6"
.. [list output truncated]
- attr(*, ".internal.selfref")=<externalptr>
【问题讨论】:
-
每次看到这样的错误,我就知道要么是我不了解数据结构,要么是不了解函数需要什么类型的数据结构。
标签: r