Description Usage Arguments Author(s) References Examples
Split a vector into n chunks
1 | chunk2(x, n)
|
x |
a vector |
n |
number of chunks |
mathheadinclouds, Dis Shishkov
http://stackoverflow.com/questions/3318333/split-a-vector-into-chunks-in-r
1 | chunk2(1:30, 6)
|
$`1`
[1] 1 2 3 4 5
$`2`
[1] 6 7 8 9 10
$`3`
[1] 11 12 13 14 15
$`4`
[1] 16 17 18 19 20
$`5`
[1] 21 22 23 24 25
$`6`
[1] 26 27 28 29 30
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.