Skip to content

Commit 87dcae9

Browse files
committed
corrected lintr
1 parent 43b8bcb commit 87dcae9

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

vignettes/datatable-joins.Rmd

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -589,11 +589,8 @@ and the right side (e.g., `B`) *must be a column from `i`*.
589589
To use expressions, create temporary columns first (see example below).
590590

591591
```{r}
592-
library(data.table)
593-
594592
x <- data.table(A = 1:5, value_x = letters[1:5])
595593
i <- data.table(B = c(2, 4, 5), value_i = LETTERS[1:3])
596-
597594
x[i, on = .(A >= B)]
598595
```
599596
In data.table, when using a non-equi join condition (>=, <, etc.), the column from x is retained in the result, while the column from i is not retained unless explicitly selected.
@@ -636,8 +633,6 @@ If you want to exclude unmatched rows, you should use nomatch = NULL:
636633
x[i, on = .(A >= B), .(B, A, value_x, value_i), nomatch = NULL]
637634
```
638635

639-
This ensures that only matching cases are returned.
640-
641636
## 5. Rolling join
642637

643638
Rolling joins are particularly useful in time-series data analysis. They allow you to **match rows based on the nearest value** in a sorted column, typically a date or time column.

0 commit comments

Comments
 (0)