getDeltaFromMedian {SingleR} | R Documentation

## Compute the difference from median

### Description

Compute the delta value for each cell, defined as the difference between the score for the assigned label and the and median score across all labels.

### Usage

    getDeltaFromMedian(results)

### Arguments

`results` | A DataFrame containing the output generated by `SingleR` or `classifySingleR`.

### Details

This funciton computes the same delta value that is used in `pruneScores`, for users who want to apply more custom filters or visualizations.

### Value

A numeric vector containing delta values for each cell in `results`.

### Author(s)

Aaron Lun

### See Also

`pruneScores`, where the delta values are used.

### Examples

    # Running the SingleR() example.
    example(SingleR, echo=FALSE)

    summary(getDeltaFromMedian(pred))

[Package SingleR version 1.1.13 Index]