Learn R Programming

ggcyto (version 1.0.5)

ggcyto.flowSet: Create a new ggcyto plot from a flowSet

Description

Create a new ggcyto plot from a flowSet

Usage

"ggcyto"(data, mapping, filter = NULL, ...)

Arguments

data
default flowSet for plot
mapping
default list of aesthetic mappings (these can be colour, size, shape, line type -- see individual geom functions for more details)
filter
a flowcore gate object or a function that takes flowSet and channels as input and returns a data-dependent flowcore gate The gate is used to filter the flow data before it is plotted.
...
ignored

Value

a ggcyto_GatingSet object which is a subclass of ggcyto class.

Examples

Run this code
data(GvHD)
fs <- GvHD[subset(pData(GvHD), Patient %in%5:7 & Visit %in% c(5:6))[["name"]]]
# 1d histogram/densityplot
p <- ggcyto(fs, aes(x = `FSC-H`))
#facet_wrap(~name)` is used automatically
p1 <- p + geom_histogram()
p1
#overwriting the default faceeting
p1 + facet_grid(Patient~Visit)

#display density
p + geom_density()

# 2d scatter/dot plot
p <- ggcyto(fs, aes(x = `FSC-H`, y =  `SSC-H`))
p <- p + geom_hex(bins = 128)
p

Run the code above in your browser using DataLab