permute.square {asremlPlus}R Documentation

Permutes the rows and columns of a square matrix.

Description

Permutes the rows and columns of a square matrix.

Usage

permute.square(x, permutation)

Arguments

x

A square matrix.

permutation

A vector specifying the new order of rows and columns.

Value

A square matrix.

Author(s)

Chris Brien

See Also

permute.to.zero.lowertri

Examples

  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)
  permtn <- c(1,3,2,4,5)
  terms.marginality <- permute.square(terms.marginality, permtn)

[Package asremlPlus version 4.4.35 Index]