/usr/lib/R/site-library/IRanges/unitTests/test_seqapply.R is in r-bioc-iranges 2.4.1-1.
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 | test_unsplit <- function() {
ir <- IRanges(1:5, 11:15)
f <- factor(c("a", "b", "a", "b", "b"), c("b", "a", "c"))
rl <- split(ir, f)
checkIdentical(unsplit(rl, f), ir)
rl <- split(ir, f, drop=TRUE)
checkIdentical(unsplit(rl, Rle(f), drop=TRUE), ir)
checkException(unsplit(rl, f, drop=FALSE), silent=TRUE)
v <- 1:5
l <- splitAsList(v, f)
checkIdentical(unsplit(l, Rle(f)), v)
}
|