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.4154421
ch_double(10)
#>  [1]  0.5040192 -2.1908905  0.8200660  2.8313260  1.4635868 -2.0512271
#>  [7] -1.3380079  0.2856218  1.3212264  1.2068936
ch_double(100)
#>   [1]  0.49704845 -0.26083973 -0.79751241  1.10643960 -0.65463389  0.68956566
#>   [7]  0.18079653 -2.01090328  0.01532773  0.89636942  0.99882385  0.23622908
#>  [13] -0.79860175 -1.28602506  0.03054772  0.17371344  0.83977459  0.95108789
#>  [19] -0.25348958 -0.74338849  0.55507013  0.38927962  1.42428424 -0.33352357
#>  [25] -1.75551437 -1.65551230 -0.27350872  1.47508148 -0.70716986 -0.27970506
#>  [31]  0.45642984 -1.62964853  0.20638480 -0.44959265  1.95555629  0.20432816
#>  [37]  0.30094300 -0.13151577  1.37717092 -0.05244915  0.97686749 -0.01835665
#>  [43]  0.43820854  0.16774983  1.48768012  0.08267832  0.72339157 -0.59114563
#>  [49] -0.07622163 -2.13837173 -0.21571928  1.02313765  2.36757132  0.31192376
#>  [55] -1.03595046  0.38836541 -0.75431629  0.37702194  0.53338251  0.95474381
#>  [61] -0.85416410 -0.20697181  0.64618305 -0.82952248  0.41365061 -1.76122743
#>  [67]  1.39697462 -1.95460224 -0.24293666  1.07895696  0.09570688 -1.28366250
#>  [73] -0.21160787 -1.41680101  0.42695246  0.40623055  0.06761579  1.26756969
#>  [79] -0.94648529 -0.43848093 -0.77506108  0.75187558 -0.23761961  0.56469792
#>  [85] -0.44742042 -0.14524825  0.19582167 -0.08407630 -0.18675410 -2.22965188
#>  [91]  0.96180222  1.34413851 -0.17937545 -0.38813003 -0.61024228 -0.59218626
#>  [97] -1.34611257 -1.13463803 -0.90239388 -0.02663458

ch_integer()
#> [1] 21
ch_integer(10)
#>  [1]  13 642 832 156 310 855 591  42 782  12
ch_integer(100)
#>   [1] 288 854 770 143 738 634 940 553 783 929 912 868 340 400 712 809  39  54
#>  [19] 438 430  81 485 248 443  12 409 939 223 971 802 754 691 208 474 925 534
#>  [37] 856 785 641 733 684 749 289 215 472 229 607 641 242 879 374  71 674 985
#>  [55] 337 709 539 250 873 972 366  65 801 760 728 403 744 370 860 397 473  32
#>  [73] 876 662 354 558 474 771 823 121 833 442 265 123  15 482 818 648 776 417
#>  [91] 868 335 763 553  98 166 176 647 213 567

ch_unif()
#> [1] 7580.348
ch_norm()
#> [1] -3.162471
ch_lnorm()
#> [1] 0.7465153
ch_beta(shape1 = 1, shape2 = 1)
#> [1] 0.2870732