From 696e58be43cdfaf9660bfce1a0efe712c9c6755c Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Fri, 26 Dec 2025 10:22:15 -0800 Subject: [PATCH 1/2] Drop gettext and use stopf directly --- R/fcast.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/R/fcast.R b/R/fcast.R index f059812dd..1af9c1891 100644 --- a/R/fcast.R +++ b/R/fcast.R @@ -185,8 +185,7 @@ dcast.data.table = function(data, formula, fun.aggregate = NULL, sep = "_", ..., fun.call = aggregate_funs(fun.call, lvals, sep, ...) maybe_err = function(list.of.columns) { if (!all(lengths(list.of.columns) == 1L)) { - msg = gettext("Aggregating functions should take a vector as input and return a single value (length=1), but they do not, so the result is undefined. Please fix by modifying your function so that a single value is always returned.") - stop(msg, domain=NA, call. = FALSE) + stopf("Aggregating functions should take a vector as input and return a single value (length=1), but they do not, so the result is undefined. Please fix by modifying your function so that a single value is always returned.", call. = FALSE) } list.of.columns } From ffc0925751192668d036f4e25930cdc29b5b4dbb Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Fri, 26 Dec 2025 10:29:32 -0800 Subject: [PATCH 2/2] No call. --- R/fcast.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/fcast.R b/R/fcast.R index 1af9c1891..35ab4eaae 100644 --- a/R/fcast.R +++ b/R/fcast.R @@ -185,7 +185,7 @@ dcast.data.table = function(data, formula, fun.aggregate = NULL, sep = "_", ..., fun.call = aggregate_funs(fun.call, lvals, sep, ...) maybe_err = function(list.of.columns) { if (!all(lengths(list.of.columns) == 1L)) { - stopf("Aggregating functions should take a vector as input and return a single value (length=1), but they do not, so the result is undefined. Please fix by modifying your function so that a single value is always returned.", call. = FALSE) + stopf("Aggregating functions should take a vector as input and return a single value (length=1), but they do not, so the result is undefined. Please fix by modifying your function so that a single value is always returned.") } list.of.columns }