这可能是由两个data.frames
中的类型不匹配造成的.
首先,判断类型(类别).要进行诊断,请执行以下操作:
new2old <- rbind( alltime, all2008 ) # this gives you a warning
old2new <- rbind( all2008, alltime ) # this should be without warning
cbind(
alltime = sapply( alltime, class),
all2008 = sapply( all2008, class),
new2old = sapply( new2old, class),
old2new = sapply( old2new, class)
)
我希望会有这样的争吵:
alltime all2008 new2old old2new
... ... ... ... ...
some_column "factor" "numeric" "factor" "character"
... ... ... ... ...
如果是,请说明:
It means that your output data are wrong! There are 100's instead of true values
我想:
- 您使用另一个R/RODBC版本创建旧数据,因此使用不同的方法创建类型(不同的设置-可能是十进制分隔符)
- 有问题的列中有空或某些特定数据,例如,有人更改数据库下的列.
解决方案:
找到错误的列,找出其错误和修复的原因.消除病因而不是症状.