tolist_by_group | R Documentation |
convert x (a vector) into a list according to the group information (another vector) of elements in x.
tolist_by_group(x, group, drop = F)
x |
a vector |
group |
a vector with equal length of x, providing group information of elements in x |
drop |
drop levels of x |
a list. Order of elements is controled by levels of group.
tolist_by_group(x = 1:10, group = c(rep("A", 5), rep("B", 5)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.