This file is indexed.

/usr/lib/R/site-library/XVector/unitTests/test_slice-methods.R is in r-bioc-xvector 0.4.0-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
16
17
test_XDouble_slice <- function() {
  ## Use slice against an Rle as an easy test
  x <- c(0.2, 0.5, 1, 1, 1, 1.5, 1.5, -.5, -.5, -.5, 10.2, 10.3)
  r <- Rle(x)
  
  for (lower in c(-0.5, 0, 1.2, 5)) {
    double.slice <- slice(x, lower)
    rle.slice <- slice(r, lower)
    checkEquals(length(double.slice), length(rle.slice))
    is.same <- sapply(1:length(double.slice), function(i) {
      d <- as.numeric(double.slice[[i]])
      r <- as.numeric(rle.slice[[i]])
      checkEqualsNumeric(d, r)
    })
    checkTrue(all(is.same))
  }
}