我有以下数据框架(显示头部示例)
dput(sample)
structure(list(VR1 = c(NA, NA, 1L, NA, 0L, NA), VR2 = c(NA,
NA,
NA, NA, NA, NA), VR3 = c(NA, NA, 0L, NA, 0L, NA), VR4 = c(NA,
NA, 1L, NA, 0L, NA), VR5 = c(NA, NA, 1L, NA, 1L, NA), VR6 =
c(NA,
NA, 0L, NA, 0L, NA), VR7 = c(NA, NA, 1L, NA, 0L, NA), VR8 =
c(NA,
NA, 0