seq_matrix {matricks}R Documentation

Return a sequence of pairs (value, index vector)

Description

Facilitates iterating over matrix, returning a sequence of pairs, where the first element is a value at index (x, y) and the second one is the index (x, y)

Usage

seq_matrix(mat)

Arguments

mat

matrix

Value

list of two-element list (single value, two-element vector)

Examples

mat <- matrix(1:9, 3, 3)
seq_matrix(mat)

[Package matricks version 0.8.2 Index]