Skip to content

Commit 55bbc3d

Browse files
length 1 aggregate for all cases and remove warn branch (#7260)
1 parent c27ec26 commit 55bbc3d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

R/fcast.R

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,7 @@ dcast.data.table = function(data, formula, fun.aggregate = NULL, sep = "_", ...,
186186
maybe_err = function(list.of.columns) {
187187
if (!all(lengths(list.of.columns) == 1L)) {
188188
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.")
189-
if (is.null(fill)) { # TODO change to always stopf #6329
190-
stop(msg, domain=NA, call. = FALSE)
191-
} else {
192-
warning(msg, domain=NA, call. = FALSE)
193-
}
189+
stop(msg, domain=NA, call. = FALSE)
194190
}
195191
list.of.columns
196192
}

0 commit comments

Comments
 (0)