powered by
Permutes a square matrix until all the lower triangular elements are zero.
permute.to.zero.lowertri(x)
A square matrix.
matrix
A square matrix of order n with at least n*(n-1)/2 zero elements.
Chris Brien
permute.square
terms.marginality <- matrix(c(1,0,0,0,0, 0,1,0,0,0, 0,1,1,0,0, 1,1,1,1,0, 1,1,1,1,1), nrow=5) terms.marginality <- permute.to.zero.lowertri(terms.marginality)
Run the code above in your browser using DataLab