R/data_utility_FBN.R
generateAllCombinationBinary.Rd
Generate all combination of binary data based on an vector of genes
generateAllCombinationBinary(genelist = c(), begin = 1, last = 0)
An vector of genes
The begin index
The last index, the default is 0 means 2^length(genelist)
individualgenes<-c('a','b','c')
testdata2 <- generateAllCombinationBinary(individualgenes)
testdata2
#> $`1`
#> [1] 0 0 0
#>
#> $`2`
#> [1] 1 0 0
#>
#> $`3`
#> [1] 0 1 0
#>
#> $`4`
#> [1] 1 1 0
#>
#> $`5`
#> [1] 0 0 1
#>
#> $`6`
#> [1] 1 0 1
#>
#> $`7`
#> [1] 0 1 1
#>
#> $`8`
#> [1] 1 1 1
#>