Statistics

Statistics go module is a module for calculating statistical data. This module is under development so there are few functions.

Instal

Installation for all platform is supported for go module.

go get -u github.com/ViperRedBulLs/statistics

Example

package main

import (
    "fmt"

    "github.com/ViperRedBulLs/statistics"
)

func main() {
    data := []float64{5, 4, 3, 2, 1}
    fmt.Println("Data Real\t:\t", data)

    // Sorted array
    statistics.Sorted(data)
    fmt.Println("Data Sorted\t:\t", data)

    // Average
    avg := statistics.Average(data)
    fmt.Println("Data Average\t:\t", avg)
}

Run this program

go run <program-file/source code file>

Or build for execution file

go build <program-file/source code file>

GitHub

View Github