classStats {twoddpcr} | R Documentation

## Get some basic statistical properties for each class.

### Description

This function gives the mean, covariance and inverse of the covariance for each of the classes.

### Usage

    classStats(droplets, classCol = "class")

### Arguments

`droplets` | A data frame of droplets with `Ch1.Amplitude` and `Ch2.Amplitude` columns, as well as a class column (see the parameter `classCol`).
`classCol` | The column (name or number) from `droplets` representing the class.

### Value

A list (grouped by class name) of lists with keys `mean`, `cov` and `cov.inv`. If `cov` is a singular matrix, then `cov.inv` will be `NULL`.

### Author(s)

Anthony Chiu, anthony.chiu@cruk.manchester.ac.uk

### Examples

    ## Get some basic statistical properties of the clusters.
    aWell <- KRASdata[["E03"]]
    aWell$Cluster <- relabelClasses(aWell, classCol="Cluster")
    classStats(aWell, classCol="Cluster")

    ## We repeat the above but with a sample with no "PP" cluster.
    aWell <- KRASdata[["H04"]]
    aWell$Cluster <- relabelClasses(aWell, classCol="Cluster")
    classStats(aWell, classCol="Cluster")

[Package twoddpcr version 1.18.0 Index]