submatrix: Submatrix of a matrix returning ALWAYS a matrix

Description Usage Arguments Value

View source: R/tools.R

Description

Submatrix of a matrix returning ALWAYS a matrix

Usage

1
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.


dMod documentation built on May 30, 2017, 6:46 a.m.

Search within the dMod package
Search all R packages, documentation and source code