jarrodu / stats

simple typeclass for descriptive statistics

GitHub

This package provides a barebones typeclass for descriptive statics for scala collections.

Just import stats.implicits._ to get the extra methods for your collections.

For example in ammonite-repl:

@ {
  import $ivy.`com.jarrodwb::stats:0.1.0`, stats.implicits._
  val x = (1 to 10).toList
  x.mean
  x.s
  x.fiveNumber
  } 
import $ivy.$                          , stats.implicits._

x: List[Int] = List(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
res6_2: Double = 5.5
res6_3: Double = 3.0276503540974917
res6_4: stats.Stats#FiveNumber = FiveNumber(1.0, 2.75, 5.5, 8.25, 10.0)