R/split.R

#' split vector into equal parts
#' @param x vector
#' @param n elements per part
split <- function(x, n = 1) {
  f <- ceiling(seq_along(x) / n)
  x <- base::split(x, f)
  x
}
jonathan-inwt/troubleshooting documentation built on May 15, 2019, 9:11 p.m.