Skip to contents

Create numbers

Usage

ch_double(n = 1, mean = 0, sd = 1)

ch_integer(n = 1, min = 1, max = 1000)

ch_unif(n = 1, min = 0, max = 9999)

ch_norm(n = 1, mean = 0, sd = 1)

ch_lnorm(n = 1, mean = 0, sd = 1)

ch_beta(n = 1, shape1, shape2, ncp = 0)

Arguments

n

(integer) number of things to get, any non-negative integer

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

Examples

ch_double()
#> [1] -0.7169645
ch_double(10)
#>  [1]  1.0840005 -1.7049349  0.4310852 -0.6874960  0.2472234 -0.2693704
#>  [7] -1.4715427 -1.1790874 -1.7333886  0.8923612
ch_double(100)
#>   [1] -1.63483213 -0.37691276 -0.17635543 -0.89768400  1.82969913 -0.21174580
#>   [7] -0.45008989  0.35411801 -1.44099715  0.43927896  0.44270803 -0.21669969
#>  [13]  0.70190589  0.50929659  0.69799234 -0.72445223 -1.87021309 -0.11497528
#>  [19]  0.44276956  0.09913349  1.12249501 -0.72459980  1.13678428  1.94601546
#>  [25]  0.33536433 -0.32519754  1.43546143 -0.87307138 -0.86006396  1.59922452
#>  [31]  1.14708436  1.22551617 -0.21172344  0.21687949  0.03006792 -1.30180756
#>  [37] -0.72550400  1.20620228  1.18798953  1.55545140 -0.64980068 -0.93578495
#>  [43]  0.36627371  0.40604296  0.52388965 -0.27036804  0.15387071  0.07570258
#>  [49] -0.23722400 -0.89538205 -0.79373225  0.26524223 -0.47517499 -1.06687009
#>  [55] -0.46781819  1.49838648 -0.33724480  1.41636746  0.24129213 -0.43622973
#>  [61]  0.45350991 -0.74091133 -1.22467159  0.04004842  0.33057660  0.79666340
#>  [67]  1.92708220 -0.55594260  1.53853742 -1.12804616  0.48070272 -1.00323591
#>  [73] -0.50355221  0.80248694 -1.56922285 -0.12054488  1.56749403  0.55793654
#>  [79]  1.02197855  1.49977930  1.59051041  0.27044342  0.76450934 -0.55513702
#>  [85]  2.31381102  0.55104443 -0.09548256  0.81066353  0.40654171 -0.95791569
#>  [91]  0.39922851 -0.64489383  0.16668572  0.63503349  0.43738398  1.24910833
#>  [97]  0.30080469 -0.63996276  1.01497104  0.13108762

ch_integer()
#> [1] 385
ch_integer(10)
#>  [1] 230   5  71 873 214 132 833 605 803 959
ch_integer(100)
#>   [1] 121 301 923 176 398  59 961 982   3 454 181 230 250 153 587 452 802  40
#>  [19] 857 654 856 928 757 432 465 328 967 733 176 657 532 755 639 254 118 497
#>  [37] 851 532 659 369 205 478  44 526 805 956  17 305 538 572 232 864 318 673
#>  [55]  31  50 374 291 582 999  92 941 110 471 908 862  88 793 228  67 591 420
#>  [73] 159 931 603 846 365 809 269 938 196 331 735 825 641 831 844 240 927 444
#>  [91]  12 218 728 105 455 329 617 285 616 462

ch_unif()
#> [1] 8887.055
ch_norm()
#> [1] -1.950543
ch_lnorm()
#> [1] 1.066702
ch_beta(shape1 = 1, shape2 = 1)
#> [1] 0.8617702