尝试将我的缺失值重新编码到NA
包中R
,epicalc
我收到以下错误:
recode(trstlglR, 99 , NA, dataFrame=ESSround5)
Error in search()[[pos]] : attempt to select more than one element
尽管该命令似乎做了我想做的事,但我担心我遗漏了一些东西。数据框太大,无法检查每个值。有人对此有经验吗?
可复制的例子:
structure(list(trstlglR = c(0L, 0L, 0L, 1L, NA, NA, NA, NA, 0L,
0L), trstplcR = c(0L, 0L, 0L, 0L, 0L, NA, NA, 0L, 0L, 0L), plcarcrR = c(0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, NA, NA)), .Names = c("trstlglR",
"trstplcR", "plcarcrR"), row.names = c(1L, 2L, 3L, 5714L, 2450L,
2980L, 3837L, 6136L, 2197L, 2198L), class = "data.frame")