cytofHist: Returns histogram for grouped data

View source: R/cytofHist.R

cytofHistR Documentation

Returns histogram for grouped data

Description

Returns histogram for grouped data

Usage

cytofHist(x, group, type = c("count", "density"), na.rm = FALSE, title = NULL)

Arguments

x

Numeric vector of values that will be plotted.

group

A vector that contains the grouping variable. It can be a numeric, factor, or character vector.

type

Either "count" or "density". The "count" selection keeps the groups on the same scale. The "density" option will over emphasize the group with the fewest observations. This is helpful when identifying where certain subgroups are relative to the majority of the data.

na.rm

TRUE if NAs should be removed prior to plotting. FALSE if they should remain. The NAs will be plotted as a separate group if they are not removed.

title

Optional title for the plot

Value

A ggplot2 histogram.

Examples

data("raw_data", package = "CATALYST")
sce <- readCytof(raw_data, beads = 'Beads', viability = c('cisPt1','cisPt2'))
sce <- labelQC(sce)
cytofHist(scores(sce, 'bead'), label(sce))


jillbo1000/cytofQC documentation built on Aug. 23, 2023, 9:47 p.m.