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.391289
ch_double(10)
#>  [1] -1.5322938  1.6446011  0.7636275 -0.1237827  0.2672955 -0.3982033
#>  [7]  0.2846543 -1.6436551  0.7002380  0.5679065
ch_double(100)
#>   [1] -0.372924564  1.673812855  0.132123114 -2.203039236  0.426863467
#>   [6]  2.332929984 -1.468851092  1.304536501  1.655341959  2.507663496
#>  [11]  0.334507970 -0.135780165 -0.225557332  1.080565531  0.725688726
#>  [16]  0.170644623  0.631122114  0.099859418 -0.951057955 -2.609701468
#>  [21]  0.636254392 -1.095493739 -0.599922992  1.497690909  0.217608045
#>  [26] -0.607598349 -0.304145134  0.449164680  0.850755855 -1.851931217
#>  [31] -1.225948655 -0.338833820  0.413398558  0.571375875  1.008946904
#>  [36] -1.850584955 -0.315828393 -0.186458813 -0.172543452 -1.405885934
#>  [41]  0.293813898  0.540011556 -0.855024102 -0.532589952 -0.962294221
#>  [46]  2.596022681 -0.012497856 -1.047458138  0.939916804  0.173044649
#>  [51] -1.057104314  0.420638341 -0.831088156  0.773418679  0.246967623
#>  [56]  0.592638476  1.580467103 -0.513939035  0.508639647  0.387147449
#>  [61]  2.820149884  0.096807542 -0.927586137 -0.101046663  0.524549158
#>  [66] -1.018956114  1.939840161  0.036356306 -0.643656875 -0.374391498
#>  [71] -0.142249186  0.079008834 -0.005324221 -0.687514869  2.359894958
#>  [76] -0.650369465  1.811098825  1.677030458 -2.420495708 -0.156337525
#>  [81] -0.600184047 -0.298566868 -0.916940729  0.450253622  0.417265577
#>  [86] -0.157142383 -1.154576594 -0.388715224 -1.080739512 -1.137800602
#>  [91]  0.390036054 -1.577709297 -0.644695206 -1.783921741  1.485125835
#>  [96]  0.841960548 -0.171654210  0.840297786 -0.023029028  0.255761369

ch_integer()
#> [1] 539
ch_integer(10)
#>  [1] 173 216 692 721 969 152  71 873 956 365
ch_integer(100)
#>   [1] 426 780 210 545 245 592 262 935 485 603 883 307 180 338  63 479 189 603
#>  [19] 158 545 917 142 797  96  21 623 445 406 666 520  67 664 115 512 290  66
#>  [37] 638 252 935 608 507 818  60 940  70 513 786 423 617 140 773 501 997 506
#>  [55] 237 897 103 624 176 829 520 536 530 102 877 296 862 486 672 944 604 327
#>  [73]  47 823 891 457 399 462 383 297  57 289 860 550 705 306   1  72 925 841
#>  [91] 137 631 574 991 396 321 438 922 538 173

ch_unif()
#> [1] 2847.898
ch_norm()
#> [1] -0.1237526
ch_lnorm()
#> [1] 0.8007097
ch_beta(shape1 = 1, shape2 = 1)
#> [1] 0.1737774