Skip to content
Newer
Older
100644 23 lines (20 sloc) 745 Bytes
6569751 @hadley Convert to Rcpp
authored Nov 27, 2013
1 # This file was generated by Rcpp::compileAttributes
2 # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
3
4 #' Split indices.
5 #'
6 #' An optimised version of split for the special case of splitting row
4bc87a3 @hadley Fix split_indices bug.
authored Mar 30, 2015
7 #' indices into groups, as used by \code{\link{splitter_d}}.
6569751 @hadley Convert to Rcpp
authored Nov 27, 2013
8 #'
9 #' @param index integer indices
4bc87a3 @hadley Fix split_indices bug.
authored Mar 30, 2015
10 #' @param n largest integer (may not appear in index). This is hint: if
6569751 @hadley Convert to Rcpp
authored Nov 27, 2013
11 #' the largest value of \code{group} is bigger than \code{n}, the output
12 #' will silently expand.
13 #' @useDynLib plyr
14 #' @keywords internal manip
15 #' @export
16 #' @examples
4bc87a3 @hadley Fix split_indices bug.
authored Mar 30, 2015
17 #' split_indices(sample(10, 100, rep = TRUE))
6569751 @hadley Convert to Rcpp
authored Nov 27, 2013
18 #' split_indices(sample(10, 100, rep = TRUE), 10)
19 split_indices <- function(group, n = 0L) {
20 .Call('plyr_split_indices', PACKAGE = 'plyr', group, n)
21 }
23bba54 @hadley Prepare for release
authored Apr 14, 2015
22
Something went wrong with that request. Please try again.