Skip to content

Commit b150b0a

Browse files
committed
warningf
1 parent c2d84ed commit b150b0a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

R/data.table.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,8 +740,10 @@ 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 = ...]"
744-
warningf(sprintf(fmt, j_type, gsub("%", "%%", deparse(jsub))), call. = FALSE)
743+
warningf(
744+
"`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 = ...]",j_type,
745+
gsub("%", "%%", deparse(jsub))
746+
)
745747
}
746748
}
747749

0 commit comments

Comments
 (0)