chunk | R Documentation |
Create chunk list from vector.
chunk(x, n, r)
x |
atomic: |
n |
integer: the length of each chunk elements |
r |
logical: All of the chunks except for the last remainder are exactly 'n'. The default value is FALSE. |
v1 <- c(1, 1, 2, NA, 3, 3, 4, 4, NA ) v2 <- factor(v1) chunk(v1, 4) chunk(v1, 4, TRUE) chunk(v2, 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.