[.ConsensusPartitionList {cola} | R Documentation

## Subset a ConsensusPartitionList object

### Description

Subset a ConsensusPartitionList object

### Usage

    ## S3 method for class 'ConsensusPartitionList'
    x[i, j, drop = TRUE]

### Arguments

`x` | A `ConsensusPartitionList-class` object.
`i` | Index for top-value methods, character or nummeric.
`j` | Index for partitioning methods, character or nummeric.
`drop` | Whether drop class

### Details

For a specific combination of top-value method and partitioning method, you can also subset by e.g. `x['SD:hclust']`.

### Value

A `ConsensusPartitionList-class` object or a `ConsensusPartition-class` object.

### Author(s)

Zuguang Gu <z.gu@dkfz.de>

### Examples

    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]

[Package cola version 1.4.1 Index]