unifab: Generate n pseudo random Uniform(a,b) numbers between a and b

View source: R/unifab.R

unifabR Documentation

Generate n pseudo random Uniform(a,b) numbers between a and b

Description

Generate n pseudo random Uniform(a,b) numbers between a and b

Usage

unifab(n = 1, a = 0, b = 1, type = "lecuyer", seed = as.integer(Sys.time()))

Arguments

n

the number of pseudo random Uniform(a,b) numbers to generate. Defaults to 1.

a

Lower bound of distribution. Defaults to 0.

b

Upper bound of distribution. Defaults to 1.

type

Method used. Either "lecuyer" or "bfs1987". Defaults to "lecuyer"

seed

Seed for pseudo random number generating algorithm. Defaults to a integer generated from the system time

Value

vector of PRN Uniform(a,b) numbers of length n

Examples

unifab(n=1e5, a = -3, b = 5)
unifab(n= 1e5, a = 100, b = 200, type = "bfs1987", seed = 1234)

donovanquimby/simulationRNG documentation built on March 19, 2022, 12:46 p.m.