matrix_indices {oeli}R Documentation

Get matrix indices

Description

This function returns matrix indices as character.

Usage

matrix_indices(x, prefix = "", exclude_diagonal = FALSE)

Arguments

x

A matrix.

prefix

A character as prefix for the indices.

exclude_diagonal

Either TRUE to exclude indices where row equals column, or FALSE to include those.

Value

A character vector.

Examples

M <- diag(3)
matrix_indices(M)
matrix_indices(M, "M_")
matrix_indices(M, "M_", TRUE)


[Package oeli version 0.5.2 Index]