split0 | R Documentation |
Splits a vector (which is casted as a factor) by its elements returning a named list with the indices for each unique element of the vector.
split0(x)
x |
A vector to split. |
A named list according to the unique elements of x
with the
integer indices of those given elements.
Andrew E Jaffe
splitit
split0(letters[seq_len(3)])
## With some repeated info
set.seed(20161005)
abc <- sample(letters[seq_len(3)], 9, replace = TRUE)
split0(abc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.