Create block index
block_index.Rd
Get the index of each block in a list.
Examples
list_labels <- list(2, 2, 3, 3, 3, 1, 1)
block_index(list_labels)
#> [1] 1 1 2 2 2 3 3
block_index.Rd
Get the index of each block in a list.
list_labels <- list(2, 2, 3, 3, 3, 1, 1)
block_index(list_labels)
#> [1] 1 1 2 2 2 3 3