.. | ||
src | ||
CHANGELOG.md | ||
index.d.ts | ||
index.js | ||
LICENSE | ||
package.json | ||
README.md |
Simple Statistics
A JavaScript implementation of descriptive, regression, and inference statistics.
Implemented in literate JavaScript with no dependencies, designed to work in all modern browsers (including IE) as well as in node.js.
Installation
- I'm using Node.js, Webpack, Browserify, Rollup, or another module bundler,
and install packages from npm.
- First, install the
simple-statistics
module, usingnpm install simple-statistics
, then include the code with require or import: - I use the
require
function to use modules in my project. (most likely)- When you use
require
, you have the freedom to assign the module to any variable name you want, but you need to specify the module's name exactly: in this case, 'simple-statistics'. Therequire
method returns an object with all of the module's methods attached to it.
var ss = require('simple-statistics')
- When you use
- I use
import
to use modules in my project. I'm probably using Babel,@std/esm
, Webpack, or Rollup.- Import all functions under the ss object:
import * as ss from 'simple-statistics'
Include a specific named export:import {min} from 'simple-statistics'
Simple statistics has only named exports for ES6.
- Import all functions under the ss object:
- First, install the
- I'm not using a module bundler. I'm writing a web page, and want to include
simple-statistics using a script tag.
- I want to support all browsers
- When you use simple-statistics from a script tag, you don't get to choose
the variable name it is assigned to: simple-statistics will always become
available globally as the variable
ss
. You can reassign this variable to another name if you want to, but doing so is optional.
- When you use simple-statistics from a script tag, you don't get to choose
the variable name it is assigned to: simple-statistics will always become
available globally as the variable
- I want to support all browsers