Describes the Values of a vector the times they are repeated and the start and end position of those values

same_inarow(v)

Arguments

v

A character, factor or numeric vector

Value

A data frame with four columns: Value (-> listed value of the input vector), Repeats (times it is repeated in a row), starts_at (start position), ends_at (end position).