idxInvert: Invert linear indices from a matrix

Description Usage Arguments Author(s) Examples

Description

Given a matrix from which which a subset of linear indices were obtained, invert those indices.

Usage

1

Arguments

m

- A matrix from which idx is a subset of linear indices, OR the number of rows/columns from such a matirx

idx

- A vector containing a subset of linear indices from the matrix m

Author(s)

Nathan S. Watson-Haigh

Examples

1
2
3
4
5
6
7
	m <- matrix(1, 5, 5)
	diag(m) <- 0
	m
	idx <- which(m==0)
	idx
	idxInvert(m, idx)
	idxInvert(5, idx)

PCIT documentation built on May 1, 2019, 8:10 p.m.