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] 1.905956
z$double(10)
#> [1] -0.6728385 -1.0629114 1.6336832 0.5408304 1.4568580 -1.9337842
#> [7] -0.8804008 -0.7977302 -0.8861310 -0.2948278
z$double(10, mean = 100)
#> [1] 99.11335 100.09908 100.72055 101.00047 100.52800 101.16361 100.17314
#> [8] 100.57792 99.88399 100.90452
z$double(10, mean = 100, sd = 17)
#> [1] 99.71803 84.32094 81.97805 69.61761 81.86862 80.79290 106.58355
#> [8] 121.59448 72.01600 97.89873
z$integer()
#> [1] 614
z$integer(10)
#> [1] 576 893 813 351 386 980 933 470 376 224
z$integer(10, 1, 20)
#> [1] 3 8 8 1 16 11 3 15 2 12
z$integer(10, 1, 10000000L)
#> [1] 3555781 4410714 8623335 2945807 3912207 6792258 3393426 4135237 6387088
#> [10] 5069504
z$unif()
#> [1] 7827.189
z$norm()
#> [1] 0.08334721
z$lnorm(10)
#> [1] 2.5023149 0.7718591 1.9680156 0.6569806 2.8496763 0.2129759 0.3513383
#> [8] 0.1030367 0.7285843 0.2285065
z$beta(10, 1, 1)
#> [1] 0.3345105 0.8340481 0.9346687 0.4715570 0.1968304 0.8390227 0.5005774
#> [8] 0.4595838 0.6416752 0.6634866