R/helper_create_chunks.R

Defines functions helper_create_chunks

helper_create_chunks <- function(x, y, n = 2L, ...) {
  n <- as.integer(n)
  v <- round(seq(x, y, length.out = n + 1L))
  x <- data.table::data.table(
    start = v[-length(v)],
    end = v[-1] - 1L,
    ...
  )
  x$end[length(x$end)] <- x$end[length(x$end)] + 1L
  x
}

Try the sigminer package in your browser

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

sigminer documentation built on May 29, 2024, 3:11 a.m.