matrix_idx: Get available marix indices

Description Usage Arguments Examples

View source: R/utils.R

Description

Get available marix indices

Usage

1
matrix_idx(mat, n.row = NULL, n.col = NULL, mask = NULL)

Arguments

mat

matrix

n.row

number of rows; default: NULL

n.col

number of columns; default: NULL

mask

logical matrix; default: NULL

Examples

1
2
3
4
5
6
7
T <- TRUE; F <- FALSE
mat <- matrix(0, 3, 3)
mask <- m(T, T, F | T, F, T | F, F, T)
# All poss
matrix_idx(mat)
matrix_idx(mat, mask = mask)
matrix_idx(mask = mask)

matricks documentation built on March 26, 2020, 6:22 p.m.