I have many columns of data that all have values of either 0, 1, or NA. For one table, I'm trying to get observations with at least one 1 in any column, so I'm using something like
subset(mydata, x == 1 | y == 1 | z == 1)
which works fine. For the second table, I'm trying to get observations with no 1 in any column, so I'm using something like
subset(mydata, x != 1 & y != 1 & z != 1)
which returns 0 observations. Considering that I have 200,000 observations total, and the first table contains ~70,000, it only makes sense to me that its inverse contains ~130,000, but this is not the case. Does anyone know what I can do here?