numeric methods, generate numbers
charlatan::BareProvider
-> NumericsProvider
Inherited methods
charlatan::BareProvider$bothify()
charlatan::BareProvider$lexify()
charlatan::BareProvider$numerify()
charlatan::BareProvider$print()
charlatan::BareProvider$random_digit()
charlatan::BareProvider$random_digit_not_zero()
charlatan::BareProvider$random_digit_not_zero_or_empty()
charlatan::BareProvider$random_digit_or_empty()
charlatan::BareProvider$random_element()
charlatan::BareProvider$random_element_prob()
charlatan::BareProvider$random_int()
charlatan::BareProvider$random_letter()
charlatan::BareProvider$randomize_nb_elements()
double()
get a double, pulls from normal distribution
NumericsProvider$double(n = 1, mean = 0, sd = 1)
n
(integer) number of values, default: 1
mean
mean value, default: 0
sd
standard deviation, default: 1
integer()
get an integer, runs sample()
on range given
NumericsProvider$integer(n = 1, min = 1, max = 1000)
n
(integer) number of values, default: 1
min
minimum value, default: 1
max
maximum value, default: 1000
unif()
get numbers from the uniform distribution
NumericsProvider$unif(n = 1, min = 0, max = 9999)
n
(integer) number of values, default: 1
min
minimum value, default: 1
max
maximum value, default: 1000
norm()
get numbers from the normal distribution
NumericsProvider$norm(n = 1, mean = 0, sd = 1)
n
(integer) number of values, default: 1
mean
mean value, default: 0
sd
standard deviation, default: 1
lnorm()
get numbers from the lognormal distribution
NumericsProvider$lnorm(n = 1, mean = 0, sd = 1)
n
(integer) number of values, default: 1
mean
mean value, default: 0
sd
standard deviation, default: 1
beta()
get numbers from the beta distribution
NumericsProvider$beta(n = 1, shape1, shape2, ncp = 0)
n
(integer) number of values, default: 1
shape1
non-negative parameters of the Beta distribution
shape2
non-negative parameters of the Beta distribution
ncp
non-centrality parameter, default: 0
clone()
The objects of this class are cloneable with this method.
NumericsProvider$clone(deep = FALSE)
deep
Whether to make a deep clone.
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