ggcyto: Plot cytometry data using the ggcyto API

Description Usage Arguments Details Examples

View source: R/ggcyto.R

Description

ggcyto() initializes a ggcyto object that inherits ggplot class. Similarly the + operator can be used to add layers to the existing ggcyto object.

Usage

1
2
3
4
ggcyto(data = NULL, ...)

## Default S3 method:
ggcyto(data = NULL, mapping = aes(), ...)

Arguments

data

The data source. A core cytometry data structure. (flowSet,flowFrame, GatingSet or GatingHierarchy)

...

other arguments passed to specific methods

Details

To invoke ggcyto:

@return ggcyto object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
data(GvHD)
fs <- GvHD[1:3]
#construct the `ggcyto` object (inherits from `ggplot` class)
p <- ggcyto(fs, aes(x = `FSC-H`)) 
p + geom_histogram() 

# display density/area
p + geom_density()
p + geom_area(stat = "density") 

# 2d scatter plot
p <- ggcyto(fs, aes(x = `FSC-H`, y =  `SSC-H`))
p + geom_hex(bins = 128)
# do it programatically through aes_string and variables
col1 <- "`FSC-H`" #note that the dimension names with special characters needs to be quoted by backticks
col2 <- "`SSC-H`"
ggcyto(fs, aes_string(col1,col2)) + geom_hex()

ggcyto documentation built on July 15, 2018, 10:01 a.m.