Skip to content

Commit 418a74e

Browse files
committed
added backticks
1 parent 242847a commit 418a74e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

R/data.table.R

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -740,11 +740,8 @@ 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-
warning(
744-
"`by` or `keyby` is ignored when `j` is ", j_type, " vector used for column selection. ",
745-
"Perhaps you intended to use `.SD`? For example: DT[, .SD[, ", deparse(jsub), "], by = ...]",
746-
call. = FALSE
747-
)
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 = ...]"
744+
warning(sprintf(fmt, j_type, gsub("%", "%%", deparse(jsub))), call. = FALSE)
748745
}
749746
}
750747

0 commit comments

Comments
 (0)