tests/isplitRowsTest.R

test01 <- function() {
  x <- matrix(rnorm(10000), 100)

  for (chunks in c(1, 2, 3, 4, 9, 10, 19, 20, 99, 100, 101)) {
    y <- do.call('rbind', as.list(isplitRows(x, chunks=chunks)))
    checkEquals(x, y)
  }

  for (chunkSize in c(1, 2, 3, 4, 9, 10, 19, 20, 99, 100, 101)) {
    y <- do.call('rbind', as.list(isplitRows(x, chunkSize=chunkSize)))
    checkEquals(x, y)
  }
}

Try the itertools package in your browser

Any scripts or data that you put into this service are public.

itertools documentation built on May 2, 2019, 6:16 p.m.