def vector_mean max_missing=0
      # FIXME: in vector_sum we preserve created vector dtype, but
      # here we are not. Is this by design or ...? - zverok, 2016-05-18
      mean_vec = Daru::Vector.new [0]*@size, index: @index, name: "mean_#{@name}"

      each_row_with_index.each_with_object(mean_vec) do |(row, i), memo|
        memo[i] = row.indexes(*Daru::MISSING_VALUES).size > max_missing ? nil : row.mean
      end
    end
Calculate mean of the rows of the dataframe.

== Arguments

* +max_missing+ - The maximum number of elements in the row that can be
zero for the mean calculation to happen. Default to 0.