Skip to content

Commit c90c52e

Browse files
authored
example(groupingsets): limit the number of threads (#7632)
1 parent cc4d45d commit c90c52e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

man/groupingsets.Rd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ groupingsets(x, \dots)
4747
\url{https://www.postgresql.org/docs/9.5/static/functions-aggregate.html#FUNCTIONS-GROUPING-TABLE}
4848
}
4949
\examples{
50+
\dontshow{.dt_threads <- setDTthreads(2)}
5051
n = 24L
5152
set.seed(25)
5253
DT <- data.table(
@@ -83,5 +84,6 @@ cube(DT, j = c(list(count=.N), lapply(.SD, sum)), by = c("color","year","status"
8384
# groupingsets
8485
groupingsets(DT, j = c(list(count=.N), lapply(.SD, sum)), by = c("color","year","status"),
8586
sets = list("color", c("year","status"), character()), id=TRUE)
87+
\dontshow{setDTthreads(.dt_threads); rm(.dt_threads)}
8688
}
8789
\keyword{ data }

0 commit comments

Comments
 (0)