Skip to content
Prev 181109 / 398503 Next

NA when indexing vectors

Hello:

Is there a more natural way to get all elements that satisfy a condition
when there are NAs in the sample?
[1] FALSE  TRUE    NA
[1]  2 NA         ## I would expect here to get just "2"
[1] 2

Thanks,
Szilard