| chunk_vector | R Documentation |
This function either
splits a vector into n chunks of equal size (type = 1),
splits a vector into chunks of size n (type = 2).
chunk_vector(x, n, type = 1, strict = FALSE)
x |
[atomic()'] |
n |
[ |
type |
[
|
strict |
[ |
A list.
Other vector helpers:
check_numeric_vector(),
check_probability_vector(),
equidistant_vectors(),
insert_vector_entry(),
map_indices(),
match_numerics(),
permutations(),
split_vector_at(),
subsets(),
vector_occurrence()
x <- 1:12
chunk_vector(x, n = 3, type = 1)
chunk_vector(x, n = 3, type = 2)
try(chunk_vector(x, n = 5, strict = TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.