subset_matrix.Rd
Return a subset or a multidimensional matrix or array of undetermined size along a specific dimension. Specifically designed to return a single index along the specified dimension (e.g. one year or one region).
subset_matrix(mat, r, d = 1, drop = TRUE)
the input matrix to subset
the index along the dimensions of interest to subset by
the dimension to subset by
whether to drop the subsetted dimension
a subsetted matrix or array