R/chunk.r

Defines functions chunk

Documented in chunk

#' Subset index chunk for processing
#'
#' 'attr' in `[.data.frame` takes too much CPU time
#'
#' @param x  Index data.frame
#' @param i  Rows to subset
#' @return   x[i,]
#' @keywords  internal
chunk = function(x, i) {
    re = lapply(x, `[`, i=i)
    re$` id ` = i
    re
}

Try the clustermq package in your browser

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

clustermq documentation built on Nov. 21, 2023, 5:06 p.m.