Skip to content

Commit 4d283ba

Browse files
revert fcast modifications
1 parent e3b8a64 commit 4d283ba

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

R/fcast.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,11 @@ 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-
stop(msg, domain=NA, call. = FALSE)
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+
}
190194
}
191195
list.of.columns
192196
}

0 commit comments

Comments
 (0)