+.ggcyto_flowSet {ggcyto} | R Documentation

## overloaded '+' method for ggcyto

### Description

It tries to copy pData from ggcyto object to the gate layers so that the gate layer does not need to have 'pd' to be supplied explicitly by users. It also calculates population statistics when geom_stats layer is added. It supports addition ggcyto layers such as 'ggcyto_par' and 'labs_cyto'.

### Usage

    ## S3 method for class 'ggcyto_flowSet'
    e1 + e2

    ## S4 method for signature 'ggcyto_flowSet,ANY'
    e1 + e2

### Arguments

`e1` | An object of class `ggcyto_flowSet`
`e2` | A component to add to `e1`

### Value

ggcyto_flowSet object

### Examples

    data(GvHD)
    fs <- GvHD[subset(pData(GvHD), Patient %in%5:7 & Visit %in% c(5:6))[["name"]]]
    p <- ggcyto(fs, aes(x = `FSC-H`, y =  `SSC-H`)) + geom_hex(bins = 128)
    #add rectangleGate layer (2d)
    rect.g <- rectangleGate(list("FSC-H" =  c(300,500), "SSC-H" = c(50,200)))
    rect.gates <- sapply(sampleNames(fs), function(sn)rect.g)
    p + geom_gate(rect.gates) + geom_stats()

[Package ggcyto version 1.14.1 Index]