Thanks for your help.
Finally I found the solution to this problem for any matrix without having
to know its number of columns
I write it down in case someone else needed it.
#Creation of b matrix
ncol<-3
b <- matrix(0, 2^ncol, ncol)
for (i in 1:ncol)
b[, ncol+1-i] <- rep(rep(c
] inverse lexicographical ordering
Dear users,
I have a matrix b as
[,1] [,2] [,3] [,4]
[1,]0000
[2,]0011
[3,]0101
[4,]0112
[5,]1001
[6,]1012
[7,]1102
[8,]1113
Dear users,
I have a matrix b as
[,1] [,2] [,3] [,4]
[1,]0000
[2,]0011
[3,]0101
[4,]0112
[5,]1001
[6,]1012
[7,]1102
[8,]1113
with last column the rowSums(b)
I w
3 matches
Mail list logo