Skip to content

Commit dd3b556

Browse files
committed
correction
1 parent b29de8e commit dd3b556

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

vignettes/datatable-joins.Rmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -573,12 +573,12 @@ ProductReceivedProd2[ProductSalesProd2,
573573

574574
When performing non-equi joins (<, >, <=, >=), it's important to understand how column names are assigned in the result.
575575

576-
- The left operand (x column) determines the column name in the result.
577-
- The right operand (i column) contributes values but does not retain its original name.
578-
- By default, data.table does not retain the i column used in the join condition unless explicitly requested.
576+
- The left operand (`x` column) determines the column name in the result.
577+
- The right operand (`i` column) contributes values but does not retain its original name.
578+
- By default, `data.table` does not retain the `i` column used in the join condition unless explicitly requested.
579579

580-
In non-equi joins, the left side of the operator (e.g., A in A >= B) must be a column from x,
581-
and the right side (e.g., B) must be a column from i. Non-equi join does not support arbitrary expressions. For example, on = .(x_col >= i_col) is valid, but on = .(x_col >= i_col + 1) is not.
580+
In non-equi joins, the left side of the operator (e.g., `A` in `A >= B`) must be a column from `x`,
581+
and the right side (e.g., `B`) must be a column from `i`. Non-equi join does not support arbitrary expressions. For example, `on = .(x_col >= i_col)` is valid, but `on = .(x_col >= i_col + 1)` is not.
582582

583583
Arbitrary comparisons can be accomplished by create temporary columns first. For example:
584584

@@ -590,7 +590,7 @@ x[i, on = .(A >= B)]
590590
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.
591591

592592
Expected Output
593-
A value_x value_i
593+
A value_x value_i
594594
1: 2 b A
595595
2: 4 d B
596596
3: 5 e C

0 commit comments

Comments
 (0)