Skip to content

Commit ea5458b

Browse files
committed
..
1 parent a5d68f3 commit ea5458b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/data.table.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ replace_dot_alias = function(e) {
768768
# else the NA in ansvals are for join inherited scope (test 1973), and NA could be in irows from join and data in i should be returned (test 1977)
769769
# in both cases leave to the R-level subsetting of i and x together further below
770770
} else if (is.numeric(j)) {
771-
if (!missingby) {
771+
if (!missingby && (missing(with) || isTRUE(with))) {
772772
warning(
773773
"`by` or `keyby` is ignored when `j` is a numeric vector used for column selection. ", "Perhaps you intended to use `.SD`? For example: DT[, .SD[, ", deparse(jsub), "], by = ...]")
774774
}

0 commit comments

Comments
 (0)