我正在遍历数据框的行
myDF$myCol <-NA
for(k in 1:nrow(myDF)){
...................
myDF[k,][myCol] <- x
}
但这给了我
Error in `[<-.data.frame`(`*tmp*`, myDF, value = 1) :
missing values are not allowed in subscripted assignments of data frames
我在代码中访问循环中每一行的特定列的问题是什么
答案 0 :(得分:0)
这应该有效:
'([^\udced\udca0\udc80-\udced\udcaf\udcbf]|\\A)[\udced\udcb0\udc80-\udced\udcbf\udcbf]([^\udced\udcb0\udc80-\udced\udcbf\udcbf]|\\Z)'