What happens if I want to select all the rows in a data.table that do not contain a particular value in the key variable using binary search? By the way, what is the correct jargon for what I want to do? Is it "nojoin"? Is it "negative selection"?
DT = data.table(x=rep(c("a","b","c"),each=3), y=c(1,3,6), v=1:9)
setkey(DT,x)
Lets do a positive selection for all rows where x=="a" but using binary search
DT["a"]
That's beautiful but I want the opposite of that. I want all the rows that are not "a" in other words where x!="a"
DT[x!="a"]
That is a vector scanning. The above line works but is uses vector scanning. I want to use binary. I was expecting the following to work, but alas...
DT[!"a"]
DT[-"a"]
The above two do not work and trying to play with nomatch got me nowhere.