Is idx possible in given matrix?

is_idx_possible(mat, idx)

Arguments

mat

matrix

idx

two-element vector

Examples

is_idx_possible(matrix(0, 3, 3), c(4, 5))
#> [1] FALSE
is_idx_possible(matrix(0, 3, 3), c(3, 2))
#> [1] TRUE