r - Is there a sql'like "where" argument in data.table to join? -
let's have these data.tables:
dt1<- data.table(c("a","b","c"),c("g","h","i"),c(4,5,6)) dt2<- data.table(c("a","b","c"),c("d","e","f"),c(3,4,5)) i
select dt1.*,dt2.v2 dt1 left join dt2 on dt1.v1 = dt2.v1 , dt2.v3= dt1.v3 - 1 but data.table. there way ?
in other words left join in data.table condition here dt1$v1 = dt2$v1 , dt2$v3 -1 = dt1$v3 .
Comments
Post a Comment