Skip to contents

Summary of repeated values in a sequence.

Usage

summary_seq(x)

Arguments

x

A vector

Value

A tibble with the values and the respective number of this values repeated in sequence.

Examples


x <- c(1, 1, 1, 2, 2, 2, 2, 3, 4, 5, 6, 7, 1, 1)

summary_seq(x)
#> # A tibble: 8 × 2
#>   value num_rep
#>   <dbl>   <int>
#> 1     1       3
#> 2     2       4
#> 3     3       1
#> 4     4       1
#> 5     5       1
#> 6     6       1
#> 7     7       1
#> 8     1       2