top n vals

top_n_vals(x, top_n = 3)

Arguments

x

vector

top_n

integer to specify top n modes

Value

character unit vector

Examples

tibble::tibble(x = 1:10 %>% c(10,10,10,5,5)) -> t1
t1 %>% top_n_vals()
#> [1] "10 (27%) | 5 (27%) | 1 (27%)"