/usr/lib/R/site-library/BiocParallel/unitTests/test_bpaggregate.R is in r-bioc-biocparallel 1.12.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | test_bpaggregate <-
function()
{
x <- data.frame(a=1:10, b=10:1)
by <- list(c(rep("a", 5), rep("b", 5)))
simplify <- TRUE
FUN <- mean
x1 <- aggregate(x, by=by, FUN=FUN)
param <- bpparam()
bpworkers(param) <- 2
x2 <- bpaggregate(x, by=by, FUN=FUN, BPPARAM=param, simplify=simplify)
checkEquals(x1, x2)
by[[2]] <- c(rep("c", 8), rep("d", 2))
x1 <- aggregate(x, by=by, FUN=FUN)
x2 <- bpaggregate(x, by=by, FUN=FUN, BPPARAM=param, simplify=simplify)
checkEquals(x1, x2)
closeAllConnections()
TRUE
}
|