DF = data.frame(x=rep(c("a","b","c"),each=3), y=c(1,3,6), v=1:9)
DT = data.table(x=rep(c("a","b","c"),each=3), y=c(1,3,6), v=1:9)
When I write DF[2,3]
,it shows 2 because that is row 2, col 3. But as for DT[2,3]
, it shows 3? I would like to know how this value 3 is arrived at, and if I want row 2 col 3. What should I do?