Method: Array#mode
- Defined in:
- lib/epitools/core_ext/array.rb
#mode ⇒ Object
Find the statistical “mode” (most frequently occurring value)
91 92 93 |
# File 'lib/epitools/core_ext/array.rb', line 91 def mode counts.max_by { |k,v| v }.first end |