J(...,SORTFIRST=FALSE)
SJ(...)
CJ(...)
[.data.table
data.table
, test.data.table
DT = data.table(A=5:1,B=letters[5:1])
setkey(DT,B) # re-orders table and marks it sorted.
DT[J("b")] # returns the 2nd row
Run the code above in your browser using DataLab