转载一个链接:
FACTORS ARE NOT FIRST-CLASS CITIZENS IN R
http://www.win-vector.com/blog/2014/09/factors-are-not-first-class-citizens-in-r/
在R中使用factor时要小心再小心!
回复 第1楼 的 yanlinlin82:我发现的原因是原模型X facter只有3类,新模型多了个missing还是什么就...反正给跪了。
我是比较烦factor这个数据类型的,可偏偏它还是很多R函数的默认数据格式
回复 第3楼 的 fatguynot:字符串多好,Factor隐藏各种麻烦~~
回复 第4楼 的 ricklovelisa:factor对ordinal data还是比字符串有好些的。
factor是为Likert-scale/ordinal data而生的。