You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A statistics package with many functions missing from the Golang standard library.
4
-
5
-
Currently only `float64` and `[]float64` data is supported due to the lack of generics. However, if the library becomes popular and there is demand I could also add support for the other number types. See the [CHANGELOG.md](https://github.com/montanaflynn/stats/blob/master/CHANGELOG.md) for API changes and tagged releases you can vendor into your projects.
3
+
A statistics package with many functions missing from the Golang standard library. See the [CHANGELOG.md](https://github.com/montanaflynn/stats/blob/master/CHANGELOG.md) for API changes and tagged releases you can vendor into your projects.
6
4
7
5
> Statistics are used much like a drunk uses a lamppost: for support, not illumination. **- Vin Scully**
8
6
@@ -16,6 +14,20 @@ go get github.com/montanaflynn/stats
16
14
17
15
## Usage
18
16
17
+
The [entire API documentation](http://godoc.org/github.com/montanaflynn/stats) is available on GoDoc.org
18
+
19
+
You can view docs offline with the following commands:
20
+
21
+
```
22
+
godoc ./
23
+
godoc ./ Median
24
+
godoc ./ Float64Data
25
+
```
26
+
27
+
**Protip:** Generate HTML docs with `godoc -http=:4444`
28
+
29
+
## Example
30
+
19
31
All the functions can be seen in [examples/main.go](https://github.com/montanaflynn/stats/blob/master/examples/main.go) but here's a little taste:
You can call methods directly on the data ([example](https://github.com/montanaflynn/stats/blob/master/examples/methods.go)) if using the Float64Data type.
44
+
**Protip:**You can [call methods](https://github.com/montanaflynn/stats/blob/master/examples/methods.go) on the data if using the Float64Data type:
33
45
34
46
```
35
47
var d stats.Float64Data = data
@@ -38,53 +50,6 @@ max, _ := d.Max()
38
50
fmt.Println(max) // 5
39
51
```
40
52
41
-
**Protip:** See all the available methods for Float64Data with `godoc ./ Float64Data`
42
-
43
-
## Documentation
44
-
45
-
The [entire API documentation](http://godoc.org/github.com/montanaflynn/stats) is available on GoDoc.org
You can view docs offline with the following commands:
79
-
80
-
```
81
-
godoc ./
82
-
godoc ./ Median
83
-
godoc ./ Outliers
84
-
```
85
-
86
-
**Protip:** Generate HTML docs with `godoc -http=:4444`
87
-
88
53
## Contributing
89
54
90
55
If you have any suggestions, criticism or bug reports please [create an issue](https://github.com/montanaflynn/stats/issues) and I'll do my best to accommodate you. In addition simply starring the repo would show your support for the project and be very much appreciated!
0 commit comments