# overloaded '+' method for ggcyto

Source: `R/ggcyto_flowSet.R`
`ggcyto_flowSet_add.Rd`

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'.

    # S3 method for ggcyto_flowSet
    +(e1, e2)

    # S4 method for 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()