When performing a rolling join by different column names, it seems like the first column name is selected by default regardless where the values are coming from. This is very confusing to me. Is this by design? (sorry flying tonight in didn't have time to test on the GH version too)
library(data.table) # V 1.9.6+
set.seed(123)
DT <- data.table(X = 1:3)
DT2 <- data.table(Y = 3:5, Z = sample(3))
DT[DT2, on = c(X = "Y"), roll = -Inf]
# X Z <~~~ The column name is X but values are from Y
#1: 3 1
#2: 4 2
#3: 5 3
When performing a rolling join by different column names, it seems like the first column name is selected by default regardless where the values are coming from. This is very confusing to me. Is this by design? (sorry flying tonight in didn't have time to test on the GH version too)