Create matrix of random choosen boolean values

rboolm(nrow, ncol, true.proba = 0.5)

Arguments

nrow

number of rows

ncol

numer of columns

true.proba

probability of true values; default: 0.5

Value

a matrix

Examples

rboolm(3, 3)
#> [,1] [,2] [,3] #> [1,] TRUE TRUE TRUE #> [2,] TRUE TRUE FALSE #> [3,] TRUE FALSE FALSE
rboolm(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