/
RcppExports.R
35 lines (32 loc) · 1.05 KB
/
RcppExports.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# This file was generated by Rcpp::compileAttributes
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' 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
#' @useDynLib plyr
#' @keywords internal manip
loop_apply <- function(n, f) {
.Call('plyr_loop_apply', PACKAGE = 'plyr', n, f)
}
#' Split indices.
#'
#' An optimised version of split for the special case of splitting row
#' indices into groups, as used by \code{\link{splitter_d}}
#'
#' @param index integer indices
#' @param n largest integer (may not appear in index). This is hint: if
#' the largest value of \code{group} is bigger than \code{n}, the output
#' will silently expand.
#' @useDynLib plyr
#' @keywords internal manip
#' @export
#' @examples
#' split_indices(sample(10, 100, rep = TRUE), 10)
split_indices <- function(group, n = 0L) {
.Call('plyr_split_indices', PACKAGE = 'plyr', group, n)
}