stats

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2022 License: BSD-3-Clause Imports: 3 Imported by: 3

README

stats GoDoc

Usage

local stats = require("stats")

local result, _ = stats.median({0,0,10})
print(result)
-- Output: 0

local result, _ = stats.percentile({0,0,10}, 100)
print(result)
-- Output: 10

Documentation

Overview

Package strings implements golang package montanaflynn/stats functionality for lua.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Loader

func Loader(L *lua.LState) int

Loader is the module loader function.

func Median

func Median(L *lua.LState) int

Median lua stats.median(table): port of go montanaflynn/stats.Median() returns value and error

func Percentile

func Percentile(L *lua.LState) int

Percentile lua stats.median(table, percentile): port of go montanaflynn/stats.Percentile() returns value and error

func Preload

func Preload(L *lua.LState)

Preload adds stats to the given Lua state's package.preload table. After it has been preloaded, it can be loaded using require:

local stats = require("stats")

func StandardDeviation

func StandardDeviation(L *lua.LState) int

StandardDeviation lua stats.median(table, percentile): port of go montanaflynn/stats.StandardDeviation() returns value and error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL