-
-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add doc.go file to show description and usage on godoc.org
- Loading branch information
1 parent
2039aba
commit 572e08a
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
Package stats is a well tested and comprehensive | ||
statistics library package with no dependencies. | ||
Example Usage: | ||
// start with some source data to use | ||
data := []float64{1.0, 2.1, 3.2, 4.823, 4.1, 5.8} | ||
// you could also use different types like this | ||
// data := stats.LoadRawData([]int{1, 2, 3, 4, 5}) | ||
// data := stats.LoadRawData([]interface{}{1.1, "2", 3}) | ||
// etc... | ||
median, _ := stats.Median(data) | ||
fmt.Println(median) // 3.65 | ||
roundedMedian, _ := stats.Round(median, 0) | ||
fmt.Println(roundedMedian) // 4 | ||
MIT License Copyright (c) 2014-2019 Montana Flynn | ||
*/ | ||
package stats |