subset.gct {cmapR} | R Documentation |
Subset a gct object using the provided row and column ids
## 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 passed on to |
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 |
a GCT object
Other GCT utilities:
annotate.gct()
,
melt.gct()
,
merge.gct()
,
rank.gct()
# 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