键[abs(list.i),i]中出错<;-在scoreItems中签名(列表i)
我最近在R中从psych包运行scoreItems函数时收到此错误:键[abs(list.i),i]中出错<;-在scoreItems中签名(列表i),r,psych,R,Psych,我最近在R中从psych包运行scoreItems函数时收到此错误: Error in keys[abs(list.i), i] <- sign(list.i) : number of items to replace is not a multiple of replacement length 钥匙中的错误[abs(list.i),i]似乎在版本1.6.12和其他版本中,psych软件包中添加了一项功能,允许您使用列表更灵活地指定评分钥匙。但是,检查键是否为列表的代码也会将da
Error in keys[abs(list.i), i] <- sign(list.i) :
number of items to replace is not a multiple of replacement length
钥匙中的错误[abs(list.i),i]似乎在版本1.6.12和其他版本中,psych软件包中添加了一项功能,允许您使用列表更灵活地指定评分钥匙。但是,检查键是否为列表的代码也会将data.frame解释为列表。在源代码中可以看到以下行:
if(is.list(keys)) keys <- make.keys(items,keys) #added 9/9/16
if(is.list(keys)) keys <- make.keys(items,keys) #added 9/9/16
test <- scoreItems(as.matrix(mykey), mydata)