Hi,

I am not aware of a built-in function, but this should do the trick:

  a = ["a","a","b","c","c","c","d"]
  d = Dict()

  for x in a
    d[x] = get!(d,x,0) + 1
  end

  for k in sort(collect(keys(d)))
    println("Value $k with count $(d[k])")
  end

Cheers,

Rene


Am 30.04.2015 um 20:35 schrieb Alexandros Fakos <[email protected]>:

> Hi, 
> 
> Is there a way to get a table of frequencies of the unique values in an array 
> in Julia?
> Something like matlab's tabulate
> 
> Thanks a lot,
> Alex

Reply via email to