na.rm function doesn't work if use more then 1 group in R
问题 In this post select group before certain observations separated by grouping var in R with NA control, when using one group add na.rm=T works. But new data, where three groups data=structure(list(add = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = "x", class = "factor"), x1 = c(0L, 2L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,