multiple sequences
multiseq.Rd
creates a sequence for every unique value in a vector
Examples
v <- c("a", "a", "a", "c", "b", "b" , "a")
multiseq(v)
#> [1] 1 2 3 1 1 2 4
multiseq.Rd
creates a sequence for every unique value in a vector
v <- c("a", "a", "a", "c", "b", "b" , "a")
multiseq(v)
#> [1] 1 2 3 1 1 2 4