Method: Bio::ContingencyTable#row_sum
- Defined in:
- lib/bio/util/contingency_table.rb
#row_sum(i) ⇒ Object
Report the sum of all values in a given row
Arguments
-
i: Row to sum
- Returns
-
Integersum of row
268 269 270 271 272 |
# File 'lib/bio/util/contingency_table.rb', line 268 def row_sum(i) total = 0 @table[i].each { |k, v| total += v } total end |