a <- data.frame(x = 1:10, y = rnorm(10))
b <- data.frame(x = 1:10, y = rnorm(10))
endoapply(a, function(x) (x - mean(x))/sd(x))
mendoapply(function(e1, e2) (e1 - mean(e1)) * (e2 - mean(e2)), a, b)
library(IRanges)
x <- IntegerList(a=1:3, b=16:11, c=22:21, d=31:36)
x
Reduce("+", x)
Filter(is.unsorted, x)
pos1 <- Position(is.unsorted, x)
stopifnot(identical(Find(is.unsorted, x), x[[pos1]]))
pos2 <- Position(is.unsorted, x, right=TRUE)
stopifnot(identical(Find(is.unsorted, x, right=TRUE), x[[pos2]]))
y <- x * 1000L
Map("c", x, y)
Run the code above in your browser using DataLab