|
66 | 66 |
|
67 | 67 | ```r |
68 | 68 | l = list( |
69 | | - data.table(id = c(1, 2, 3), x = c("a", "b", "c")), |
70 | | - data.table(id = c(1, 2, 4), y = c("d", "e", "f")), |
71 | | - data.table(id = c(1, 3, 4), z = c("g", "h", "i")) |
| 69 | + data.table(id = c(1L, 2L, 3L), x = c("a", "b", "c")), |
| 70 | + data.table(id = c(1L, 2L, 4L), y = c("d", "e", "f")), |
| 71 | + data.table(id = c(1L, 3L, 4L), z = c("g", "h", "i")) |
72 | 72 | ) |
73 | 73 |
|
74 | 74 | # Recursive inner join |
75 | 75 | mergelist(l, on = "id", how = "inner") |
76 | 76 | # id x y z |
77 | 77 | # 1: 1 a d g |
78 | 78 |
|
79 | | - # Recursive full outer join |
80 | | - mergelist(l, on = "id", how = "full") |
81 | | - # id x y z |
82 | | - # 1: 1 a d g |
83 | | - # 2: 2 b e <NA> |
84 | | - # 3: 3 c <NA> h |
85 | | - # 4: 4 <NA> f i |
| 79 | + # Recursive left join (the default 'how') |
| 80 | + mergelist(l, on = "id", how = "left") |
| 81 | + # id x y z |
| 82 | + # 1: 1 a d g |
| 83 | + # 2: 2 b e <NA> |
| 84 | + # 3: 3 c <NA> h |
86 | 85 | ``` |
87 | 86 |
|
88 | 87 | ### BUG FIXES |
|
0 commit comments