[.ConsensusPartitionList {cola} | R Documentation |
Subset a ConsensusPartitionList object
## S3 method for class 'ConsensusPartitionList' x[i, j, drop = TRUE]
x |
a |
i |
index for top-value methods, character or nummeric. |
j |
index for partition methods, character or nummeric. |
drop |
whether drop class |
For a specific combination of top-value method and partition method, you can also
subset by e.g. x['sd:hclust']
.
A ConsensusPartitionList-class
object or a ConsensusPartition-class
object.
Zuguang Gu <z.gu@dkfz.de>
data(cola_rl) cola_rl[c("sd", "MAD"), c("hclust", "kmeans")] cola_rl["sd", "kmeans"] # a ConsensusPartition object cola_rl["sd:kmeans"] # a ConsensusPartition object cola_rl[["sd:kmeans"]] # a ConsensusPartition object cola_rl["sd", "kmeans", drop = FALSE] # still a ConsensusPartitionList object cola_rl["sd:kmeans", drop = FALSE] # still a ConsensusPartitionList object cola_rl["sd", ] cola_rl[, "hclust"] cola_rl[1:2, 1:2]