filter {CATALYST} | R Documentation

## Filter daFrame

### Description

Filters events/genes from a `daFrame` using conditional statements.

### Usage

    filter(x, ..., k)

    ## S4 method for signature 'daFrame,character'
    filter(x, ..., k = NULL)

    ## S4 method for signature 'daFrame,missing'
    filter(x, ..., k = NULL)

### Arguments

`x` | a `daFrame`.
`...` | conditional statements separated by comma. Only rows/columns where the condition evaluates to TRUE are kept.
`k` | numeric or character string. Specifies the clustering to extract populations from. Must be one of `names(cluster_codes(x))`. Defaults to `"som100"`.

### Value

a `daFrame`.

### Author(s)

Helena Lucia Crowell helena.crowell@uzh.ch

### Examples

    data(PBMC_fs, PBMC_panel, PBMC_md, merging_table)
    daf <- daFrame(PBMC_fs, PBMC_panel, PBMC_md)

    # run clustering
    daf <- cluster(daf)

    # one condition only, remove a single sample
    filter(daf, condition == "Ref", sample_id != "Ref1")

    # keep only a subset of clusters
    filter(daf, cluster_id %in% c(7, 8, 18), k = "meta20")

[Package CATALYST version 1.8.7 Index]