numeric methods, generate numbers
Super class
charlatan::BareProvider
-> NumericsProvider
Methods
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()
Method double()
get a double, pulls from normal distribution
Method norm()
get numbers from the normal distribution
Method beta()
get numbers from the beta distribution
Examples
z <- NumericsProvider$new()
z$double()
#> [1] -0.7904276
z$double(10)
#> [1] 0.75848016 2.07837562 1.91913490 0.07552982 0.26775153 0.43629074
#> [7] 1.20974878 -1.25305556 1.76502863 -0.15932203
z$double(10, mean = 100)
#> [1] 100.89887 99.29500 101.12690 98.02568 98.75523 101.03125 100.57910
#> [8] 98.96211 101.56162 100.10196
z$double(10, mean = 100, sd = 17)
#> [1] 139.51205 139.53948 78.01645 99.23468 103.32680 108.17060 134.29482
#> [8] 120.32535 111.16178 117.44706
z$integer()
#> [1] 724
z$integer(10)
#> [1] 104 616 160 968 628 405 305 706 691 662
z$integer(10, 1, 20)
#> [1] 5 17 6 6 7 19 9 14 6 7
z$integer(10, 1, 10000000L)
#> [1] 9978813 2183305 3527149 470969 8284400 9396093 7842472 6437681 3168009
#> [10] 6596949
z$unif()
#> [1] 5597.082
z$norm()
#> [1] 0.8919746
z$lnorm(10)
#> [1] 0.6960371 0.8616938 1.6057145 2.8624813 2.3885362 0.2565002 1.7535319
#> [8] 0.9444906 1.3055869 0.8067946
z$beta(10, 1, 1)
#> [1] 0.97926836 0.02445234 0.32075872 0.95024362 0.84223617 0.22398296
#> [7] 0.24510131 0.35306940 0.01013546 0.13282015