Skip to content

Commit 5e6b246

Browse files
remove small error
1 parent edaf377 commit 5e6b246

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

man/groupingsets.Rd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ groupingsets(DT, jj = quote(list(count = .N, total = sum(value))),
9696
sets = list("color", c("year","status"), character()), id = TRUE)
9797
9898
# Example showing when substitute() is necessary - in a wrapper function
99-
custom_grouping <- function(dt, multiplier = 1) {
99+
custom_grouping <- function(DT, multiplier = 1) {
100100
# Here substitute() is needed to capture 'multiplier' from function environment
101-
groupingsets(dt, jj = substitute(list(count = .N, total = sum(value) * multiplier)),
102-
by = c("color", "year", "status"),sets = list("color", c("year", "status"), character()),
103-
id = TRUE)
101+
groupingsets(DT, jj = substitute(list(count = .N, total = sum(value) * multiplier)),
102+
by = c("color", "year", "status"),
103+
sets = list("color", c("year", "status"), character()), id = TRUE)
104104
}
105105
# Using the wrapper function
106106
custom_grouping(DT, multiplier = 2)

0 commit comments

Comments
 (0)