powered by
matrix
This function returns matrix indices as character.
character
matrix_indices(x, prefix = "", exclude_diagonal = FALSE)
A character
vector.
vector
A matrix.
A character as prefix for the indices.
Either TRUE to exclude indices where row equals column, or FALSE to include those.
TRUE
FALSE
M <- diag(3) matrix_indices(M) matrix_indices(M, "M_") matrix_indices(M, "M_", TRUE)
Run the code above in your browser using DataLab