I seem to have a syntactical error that I am not able to find.
I have a column of a data frame seperated in a list called column
. I want to find all the missing values in this column. However, for some reason I get the whole list returned.
Here's my attempt
> length(column)
[1] 712789
> length(column[column == ""])
[1] 24181
> length(column[column == "0"])
[1] 24181
> length(column[is.na(column)])
[1] 24181
> length(column[column == "" || column == "0" || is.na(column)])
[1] 712789
This is strange. I would expect the last subset to be 24181
as well. Even if all the subsets above would refer to different elements, the output shouldn't be greater than 24181 x 3 = 72549
. Instead, the whole list is part of the subset.
What am I doing wrong?
[edit]
For couriosity I tried any combination of two (instead of three) subsets: the result also was 712789
each time.