permutation: Permute an adjacency matrix

Description Usage Arguments Value Author(s) Examples

Description

Permute an adjacency matrix.

Usage

1
permutation(network,namesequence)

Arguments

network

An adjacency matrix to be permuted. Has to have row names and column names (no NAs or NULLs allowed).

namesequence

A character vector having the same entries as rownames(network) and colnames(network), but in a different order. network will be permuted in such a way that rownames(network) and colnames(network) are identical to namesequence.

Value

A permuted adjacency matrix where rownames(network) and colnames(network) are identical to namesequence.

Author(s)

Angela Bohn angela.bohn at gmail.com

Examples

1
2
3
network <- matrix(c(0,1,0,1,0,1,0,1,0),ncol=3)
rownames(network) <- colnames(network) <- c("PersonA","PersonB","PersonC")
permutation(network,c("PersonB","PersonA","PersonC"))

snatm documentation built on May 2, 2019, 5:01 p.m.

Related to permutation in snatm...