1
我需要知道为什么会出现提到错误,尽管当我用任何数值代替DFinal [i,“x”]时工作正常,感谢你的帮助sqliteSendQuery(con,statement,bind.data)中的错误:error in statement:[
for(i in 1:nrow(DFinal)){
+ result =0
+ var1= DFinal[i,"x"]
+ var2= DFinal[i,"y"]
+ result <- sqldf(' select count(distinct(V5)) from DLoc where V1= DFinal[i,"x"] and V5 in (select distinct(V5) from DLoc where V1=var2) ')
+
+ DFinal[i,"res"]<- result
+
+ }
错误sqliteSendQuery(CON,声明,bind.data): 错误的语句:近 “[我,” X “]”:语法错误