You can use countmap
from StatsBase.jl
julia> using StatsBase
julia> countmap([1, 1, 2, 3, 2, 1, 4, 1])
Dict{Int64, Int64} with 4 entries:
4 => 1
2 => 2
3 => 1
1 => 4
You can use countmap
from StatsBase.jl
julia> using StatsBase
julia> countmap([1, 1, 2, 3, 2, 1, 4, 1])
Dict{Int64, Int64} with 4 entries:
4 => 1
2 => 2
3 => 1
1 => 4