subset_gct: Subset a gct object using the provided row and column ids

Description Usage Arguments Value See Also Examples

Description

Subset a gct object using the provided row and column ids

Usage

1
2
3
4
5
6
7
## S3 method for class 'gct'
subset(...)

subset_gct(g, rid = NULL, cid = NULL)

## S4 method for signature 'GCT'
subset_gct(g, rid = NULL, cid = NULL)

Arguments

...

arguments passed on to subset_gct

g

a gct object

rid

a vector of character ids or integer indices for ROWS

cid

a vector of character ids or integer indices for COLUMNS

Value

a GCT object

See Also

Other GCT utilities: annotate.gct(), melt.gct(), merge.gct(), rank.gct()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# first 10 rows and columns by index
(a <- subset_gct(ds, rid=1:10, cid=1:10))

# first 10 rows and columns using character ids
# use \code{ids} to extract the ids
rid <- ids(ds)
cid <- ids(ds, dimension="col")
(b <- subset_gct(ds, rid=rid[1:10], cid=cid[1:10]))

identical(a, b) # TRUE

cmap/cmapR documentation built on Oct. 14, 2021, 12:51 a.m.