submatrix: Sub-matrix

View source: R/matrix.R

Sub-matrixR Documentation

Sub-matrix

Description

Sub-matrix.

Usage

submatrix(x,rowStart=1,rowEnd=1,colStart=1,colEnd=1)

Arguments

x

A Matrix, List, Dataframe or Vector.

rowStart

Start of the row.

rowEnd

End of the row.

colStart

Start of the col.

colEnd

End of the col.

Value

sub matrix like R's, x[startrow:endrow,startcol:endcol]. Fast especially for big sub matrices.

Author(s)

Manos Papadakis

R implementation and documentation: Manos Papadakis <papadakm95@gmail.com>.

See Also

Match, mvbetas, correls, univglms, colsums, colVars

Examples

x <- matrix( rnorm(100 * 100), ncol = 100 )
res<-submatrix(x,1,50,1,25) # x[1:50,1:25]

x<-NULL

Rfast documentation built on Nov. 9, 2023, 5:06 p.m.