plotDR {CATALYST} | R Documentation

## Plot dim. reduction from a `daFrame`

### Description

Plot cell-level reduced dimensions stored within a `daFrame` object.

### Usage

    plotDR(x, ...)

    ## S4 method for signature 'daFrame'
    plotDR(x, dr = c("TSNE", "PCA", "MDS", "UMAP",
      "DiffusionMap"), color_by = "meta20", facet = NULL)

### Arguments

`x` | a `daFrame`.
`...` | optional arguments.
`dr` | character string specifying the dimensionaly reduction method.
`color_by` | character string specifying a clustering, marker, or `rowData` column name to color by.
`facet` | a character string specifying a `rowData` column to facet by.

### Value

a `ggplot` object.

### Author(s)

Helena L. Crowell helena.crowell@uzh.ch

### Examples

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

    daf <- runDR(daf, "PCA")
    plotDR(daf, "PCA", color_by = "condition")

    daf <- cluster(daf)
    plotDR(daf, "PCA", color_by = "meta5")

[Package CATALYST version 1.8.7 Index]