permute.square: Permutes the rows and columns of a square matrix.

permute.squareR 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)

asremlPlus documentation built on Oct. 27, 2024, 5:06 p.m.