Create matrix of random choosen boolean values
rboolm(nrow, ncol, true.proba = 0.5)
nrow | number of rows |
---|---|
ncol | numer of columns |
true.proba | probability of true values; default: 0.5 |
a matrix
rboolm(3, 3)#> [,1] [,2] [,3] #> [1,] TRUE TRUE TRUE #> [2,] TRUE TRUE FALSE #> [3,] TRUE FALSE FALSErboolm(4, 5, true.proba = 0.3)#> [,1] [,2] [,3] [,4] [,5] #> [1,] TRUE FALSE TRUE FALSE TRUE #> [2,] FALSE FALSE FALSE FALSE FALSE #> [3,] FALSE FALSE FALSE FALSE FALSE #> [4,] TRUE TRUE FALSE TRUE FALSE