Method: Daru::Vector#numeric_summary

Defined in:
lib/daru/vector.rb

#numeric_summaryString

Displays summary for an numeric type Vector

Returns:

  • (String)

    String containing numeric vector summary



991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
# File 'lib/daru/vector.rb', line 991

def numeric_summary
  summary = "\n  median: #{median}" +
            "\n  mean: %0.4f" % mean
  if sd
    summary << "\n  std.dev.: %0.4f" % sd +
               "\n  std.err.: %0.4f" % se
  end

  if count_values(*Daru::MISSING_VALUES).zero?
    summary << "\n  skew: %0.4f" % skew +
               "\n  kurtosis: %0.4f" % kurtosis
  end
  summary
end