Split vector into equal pieces

Splits a vector in pieces with defined length and a remainder. Useful when to split datasets by ID for plotting over several pages.

aux_splitVectorEqualPieces(x, n)

Arguments

x

Vector to be splitted

n

Number of elements per piece

Value

List with the split pieces

Examples

if (FALSE) { # \dontrun{
x <- 1:20
aux_splitVectorEqualPieces(x,3)
} # }