I am trying to remove rows with NA in column 1 (row 4 in the example below), but instead of having the row removed, the entire row 4 is replaced with NA:
dat <- data.frame(x1 = c(1,2,3, NA, 5), x2 = c(100, NA, 300, 400, 500))
> dat
# x1 x2
# 1 1 100
# 2 2 NA
# 3 3 300
# 4 NA 400
# 5 5 500
ad<- dat[dat$x1!=1,]
> ad
# x1 x2
# 2 2 NA
# 3 3 300
# NA NA NA
# 5 5 500