submatrix: Sub-matrix

Description Usage Arguments Value Author(s) See Also Examples

View source: R/matrix.R

Description

Sub-matrix.

Usage

1
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

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

x<-NULL

Example output

Loading required package: Rcpp
Loading required package: RcppZiggurat

Rfast documentation built on Dec. 11, 2021, 9:59 a.m.