Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions R/groupingsets.R
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,6 @@ groupingsets.data.table = function(x, j, by, sets, .SDcols, id = FALSE, jj, labe
warningf("For the following variables, the 'label' value was already in the data: %s", brackify(info))
}
}
# workaround for rbindlist fill=TRUE on integer64 #1459
int64.cols = vapply_1b(empty, inherits, "integer64")
int64.cols = names(int64.cols)[int64.cols]
if (length(int64.cols) && !requireNamespace("bit64", quietly=TRUE))
stopf("Using integer64 class columns require to have 'bit64' package installed.") # nocov
int64.by.cols = intersect(int64.cols, by)
# aggregate function called for each grouping set
# inline all arguments that might clash with enclosing environment
pcall = substitute(x[, jj], list(x = x, jj = jj))
Expand All @@ -166,11 +160,6 @@ groupingsets.data.table = function(x, j, by, sets, .SDcols, id = FALSE, jj, labe
i_str = paste(c("1", "0")[by %chin% by.set + 1L], collapse="")
set(r, j = "grouping", value = if (nzchar(i_str)) strtoi(i_str, base=2L) else 0L)
}
if (length(int64.by.cols)) {
# workaround for rbindlist fill=TRUE on integer64 #1459
missing.int64.by.cols = setdiff(int64.by.cols, by.set)
if (length(missing.int64.by.cols)) r[, (missing.int64.by.cols) := bit64::as.integer64(NA)]
}
if (!is.null(label) && length(by.label.use.vars <- intersect(setdiff(by, by.set), names(label.use))) > 0L)
r[, (by.label.use.vars) := label.use[by.label.use.vars]]
r
Expand Down
Loading