R data.table join,如何保持两个连接的列

时间:2018-01-19 11:16:48

标签: r data.table

A = data.table(idxA = rep(1:5, 2), valueA = runif(10))
B = data.table(idxB = rep(4:8, 2), valueB = runif(10))
C = A[B, on = .(idxA < idxB), allow.cartesian = TRUE]

如何在联接表格idxB中获取列C,即C列同时包含idxAidxB列?

0 个答案:

没有答案