Skip to content

Commit f5bb7a7

Browse files
committed
updated examples
1 parent f68c6bc commit f5bb7a7

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

NEWS.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,23 +66,22 @@
6666

6767
```r
6868
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"))
7272
)
7373

7474
# Recursive inner join
7575
mergelist(l, on = "id", how = "inner")
7676
# id x y z
7777
# 1: 1 a d g
7878

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
8685
```
8786

8887
### BUG FIXES

0 commit comments

Comments
 (0)