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] -1.464092
ch_double(10)
#>  [1] -2.11719237  0.33888009  0.09595542 -0.25019719 -1.09141218 -0.96071443
#>  [7]  0.32404923 -0.28383697  0.05510898  0.40419330
ch_double(100)
#>   [1] -1.72534917 -0.27820581 -0.80263862 -0.83380435  0.22570229 -0.15437782
#>   [7]  0.38810213 -0.15694331 -0.99673625  1.65124990  1.06056338 -0.69204073
#>  [13] -0.04911378  0.37373304 -0.09029399  0.53018636 -0.01521621  2.11381732
#>  [19]  0.50414344 -0.32222192  1.77991786  0.06894647  1.73252471  0.92017607
#>  [25] -1.83118093 -0.75063114  0.76185264 -0.96691698  0.11104321  0.10382099
#>  [31] -0.55014009 -0.31866043 -1.55202084  1.90883536 -1.21822117 -0.36217009
#>  [37] -0.69355636 -0.75195875 -0.92866970 -0.36602378 -0.12111647 -2.20247097
#>  [43]  0.70753179  0.01874014 -0.32344971 -1.00199527  1.56538744 -0.35868596
#>  [49] -1.39066024 -1.48954734  0.39027752 -0.60996013 -0.16642790  0.61009427
#>  [55] -0.48544705 -0.98817510  1.93213252 -0.25564039  0.90508774  1.68830622
#>  [61]  2.10703351  3.17900049 -0.67222783 -0.91459695 -0.59176363 -0.60935695
#>  [67] -0.36367760  0.30404895 -0.04795346 -0.42916336 -1.56819996  1.12243442
#>  [73] -0.32491219  1.51325024 -0.14370914 -0.18475280 -0.47015243  0.96754213
#>  [79] -1.35040703 -0.05497960  0.71579287  1.61365992  0.33135062 -0.54306280
#>  [85] -1.06367284 -1.42736910 -1.18594306  0.52508566  0.40161268 -0.20513332
#>  [91]  0.72925171  0.23139352 -0.14564263 -0.27213349  1.25512287  0.68769926
#>  [97] -0.67658152 -0.82103817  0.71334321 -0.10810076

ch_integer()
#> [1] 44
ch_integer(10)
#>  [1] 875 173 583 808 468 482 217 153 293 244
ch_integer(100)
#>   [1] 430  74 565 414 855 791 861 245 518 564 434 659 195 251 532 420 658 568
#>  [19]  12 127 861 232 759 543 322 787 128  35 310  22  52 430 244 190 171 211
#>  [37] 750 370 203  32 428 584 404 440 425 170 218  97 986 996 278 275 628 655
#>  [55] 286 730 592 262 738 357 702 809 251 160 714 183 801 871 944  78 534 843
#>  [73] 376 384 694 209 724 936 735 767 208 710 316 886  42 753 697 517 382 544
#>  [91] 499 704  19 190 907 191 849 285 123  45

ch_unif()
#> [1] 4894.281
ch_norm()
#> [1] 1.347164
ch_lnorm()
#> [1] 0.2205281
ch_beta(shape1 = 1, shape2 = 1)
#> [1] 0.9573584