tolist_by_group.Rdconvert 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.
#> $A #> [1] 1 2 3 4 5 #> #> $B #> [1] 6 7 8 9 10 #>