Learn R Programming

charlatan (version 0.1.0)

NumericsProvider: NumericsProvider

Description

NumericsProvider

Arguments

n

number of values

mean

mean value

sd

standard deviation

min

minimum value

max

maximum value

shape1, shape2

non-negative parameters of the Beta distribution

ncp

non-centrality parameter

Details

Methods

double()

get a double, pulls from normal distribution

integer()

get an integer, runs sample on range given

unif()

get numbers from the uniform distribution

norm()

get numbers from the normal distribution

lnorm()

get numbers from the lognormal distribution

beta()

get numbers from the beta distribution

Examples

Run this code
# NOT RUN {
z <- NumericsProvider$new()

z$double()
z$double(10)
z$double(10, mean = 100)
z$double(10, mean = 100, sd = 17)

z$integer()
z$integer(10)
z$integer(10, 1, 20)
z$integer(10, 1, 10000000L)

z$unif()
z$norm()
z$lnorm(10)
z$beta(10, 1, 1)
# }

Run the code above in your browser using DataLab