The return value is a two-column integer matrix. Column one represents the unique ids of the input vector, column two the respective number of occurrences / counts.
ids_to_count_matrix(ids)
| ids | a vector of ids (integer values) |
|---|
#> [,1] [,2] #> [1,] 1 1 #> [2,] 5 2 #> [3,] 7 4#> ids #> 1 5 7 #> 1 2 4