Generate all combination of binary data based on an vector of genes

generateAllCombinationBinary(genelist = c(), begin = 1, last = 0)

Arguments

genelist

An vector of genes

begin

The begin index

last

The last index, the default is 0 means 2^length(genelist)

Examples

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
#>