Created
August 19, 2016 16:12
-
-
Save wolkym/ed7b8e8a36a9d575ddee3d2cec10fa9c to your computer and use it in GitHub Desktop.
data.table cross join
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(data.table) | |
dt1 = data.table(a = 1:4, b = 4:1) | |
dt2 = data.table(c = letters[1:4]) | |
dt2[, dt1[], by = c] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment