# randgen

> Node.js package for generating different kinds of random numbers.

Latest version **0.1.0** (published 2013-08-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install randgen
pnpm add randgen
yarn add randgen
bun add randgen
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2013-08-28 |
| First published | 2012-12-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 18 |
| Author | Rob Britton |
| Maintainers | robbrit |

## Links

- npm: https://www.npmjs.com/package/randgen
- Repository: git@github.com:robbrit/randgen
- Issues: https://github.com/robbrit/randgen/issues
- npm.io page: https://npm.io/package/randgen

## Recent versions

- 0.1.0 (latest) — 2013-08-28
- 0.0.4 — 2013-05-12
- 0.0.2 — 2012-12-31
- 0.0.1 — 2012-12-31

## README

randgen
=======

Node.js package for generating different kinds of random numbers: Uniform,
Normal/Gaussian, Poisson, Chi-squared, Cauchy.

Installation:
=============

    npm install randgen

Features:
=========

* Supported distributions: Uniform, Normal, Poisson, Chi-Square, Cauchy
* Vector versions of all supported distributions

Usage:
======

Generate Gaussian random numbers:

    num = rnorm();     // standard normal
    num = rnorm(2, 5); // normal with mean 2 and standard deviation of 5

Chi-Squared:

    num = rchisq(4);   // 4 degrees of freedom

Random element from a list:

    num = rlist([1, 2, 3, 4]);

Others: `runif`, `rpoisson`, `rcauchy`, `rbernoulli`

You can also generate vectors of random numbers:

    nums = rvnorm(100); // generate 100 standard normal values

Others: `rvunif`, `rvchisq`, `rvpoisson`, `rvcauchy`, `rvlist`, `rvbernoulli`

It also includes a handy `histogram()` function to convert an array of numbers
into a set of bins:

    bins = histogram(data);     // defaults to 10 bins
    bins = histogram(data, 20); // 20 bins

LICENSE:
========

MIT License

---
_Source: https://npm.io/package/randgen · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
