Skip to content

Commit 528c631

Browse files
committed
changed backticks
1 parent ec368f0 commit 528c631

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

R/data.table.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ replace_dot_alias = function(e) {
740740
if (is.character(j) || (is.numeric(j) && !is.logical(j))) {
741741
if (!missingby) {
742742
j_type = if (is.character(j)) "a character" else "a numeric"
743-
fmt = "'by' or 'keyby' is ignored when 'j' is %s vector used for column selection. Perhaps you intended to use '.SD'? For example: DT[, .SD[, %s], by = ...]"
743+
fmt = "`by` or `keyby` is ignored when `j` is %s vector used for column selection. Perhaps you intended to use `.SD`? For example: DT[, .SD[, %s], by = ...]"
744744
warning(sprintf(fmt, j_type, deparse(jsub)), call. = FALSE)
745745
}
746746
}

inst/tests/tests.Rraw

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21622,9 +21622,9 @@ local({
2162221622

2162321623
# 5397 - keyby/key ignored if numeric indices used in j
2162421624
DT = data.table(a=1:4, b=5:8, g=c(1,1,2,2))
21625-
test(2339.1, DT[, 1:2, by=g], DT[, 1:2], warning="'by' or 'keyby' is ignored")
21626-
test(2339.2, DT[, 2:1, keyby=g], DT[, 2:1], warning="'by' or 'keyby' is ignored")
21627-
test(2339.3, DT[, c("b", "a"), by=g, with=FALSE], DT[, c("b", "a")], warning="'by' or 'keyby' is ignored")
21625+
test(2339.1, DT[, 1:2, by=g], DT[, 1:2], warning="`by` or `keyby` is ignored")
21626+
test(2339.2, DT[, 2:1, keyby=g], DT[, 2:1], warning="`by` or `keyby` is ignored")
21627+
test(2339.3, DT[, c("b", "a"), by=g, with=FALSE], DT[, c("b", "a")], warning="`by` or `keyby` is ignored")
2162821628
expected_sd = data.table(g=c(1,1,2,2), a=1:4, b=5:8)
2162921629
test(2339.4, DT[, .SD[, 1:2], by=g], expected_sd)
2163021630
expected_single_int = data.table(g=c(1,2), V1=c(1,1))

0 commit comments

Comments
 (0)