R/loop_apply.R

Defines functions loop_apply

Documented in loop_apply

#' Loop apply
#'
#' An optimised version of lapply for the special case of operating on
#' \code{seq_len(n)}
#'
#' @param n length of sequence
#' @param f function to apply to each integer
#' @param env environment in which to evaluate function
#' @keywords internal manip
loop_apply <- function(n, f, env = parent.frame()) {
  .Call(loop_apply_, as.integer(n), f, env)
}

Try the plyr package in your browser

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

plyr documentation built on Oct. 2, 2023, 9:07 a.m.