sub-.GctMatrix: Subsetting for GctMatrix

[.GctMatrixR Documentation

Subsetting for GctMatrix

Description

Subsetting for GctMatrix

Usage

## S3 method for class 'GctMatrix'
x[i, j, ...]

Arguments

x

A GctMatrix object

i

Index to subset rows, either integers, logical values, or characters. Other types will be converted to characters.

j

Index to subset columns.

...

Other parameters passed to matrix subsetting

Value

A GctMatrix object, subsetted according to the given indices.

Examples

m1 <- matrix(1:6, nrow=3, dimnames=list(sprintf("G%d", 1:3), sprintf("S%d", 1:2)))
gm1 <- GctMatrix(m1, desc=sprintf("Gene%d", 1:3))
gm1[1:2,]
gm1[c(TRUE, FALSE, TRUE),]
gm1[c("G3", "G1"),]
gm1[1:3,2:1]
gm1[1,]
gm1[,-1]

ribiosIO documentation built on Feb. 20, 2026, 5:09 p.m.