Displaying 1 result from an estimated 1 matches for "comparevector".
2004 Feb 27
1
question about setdiff()
Thank you for your answers,
I have another question:
the behaviour of setdiff(indicesFalse, indicesNA)
does not seem predictable to me.
> indices
[1] 1 2 3 4 5 6
> compareVector
[1] NA TRUE TRUE TRUE FALSE NA
> indicesNA = indices[is.na(compareVector)]
> indicesNA
[1] 1 6
> indicesFalse = indices[compareVector == FALSE]
> indicesFalse
[1] NA 5 NA
> setdiff(indicesNA, indicesFalse) ######################## OK
[1] 1 6
> setdiff(indices...