Learn R Programming

matricks (version 0.8.2)

seq_matrix: 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

Run this code
# NOT RUN {
mat <- matrix(1:9, 3, 3)
seq_matrix(mat)
# }

Run the code above in your browser using DataLab