submatrix: Submatrix of a matrix returning ALWAYS a matrix

View source: R/tools.R

submatrixR Documentation

Submatrix of a matrix returning ALWAYS a matrix

Description

Submatrix of a matrix returning ALWAYS a matrix

Usage

submatrix(M, rows = 1:nrow(M), cols = 1:ncol(M))

Arguments

M

matrix

rows

Index vector

cols

Index vector

Value

The matrix M[rows, cols], keeping/adjusting attributes like ncol nrow and dimnames.


dkaschek/dMod documentation built on Aug. 16, 2024, 1:37 a.m.