Group a flowSet or GatingSet by experiment variables

cyto_group_by(x, group_by = "all")

Arguments

x

an object of class flowSet or GatingSet.

group_by

names of cyto_details variables to use for merging, set to "all" to group all samples in x. The order of the grouping can be controlled by specifying the factor levels in a list (e.g. list(Treatment = c("Stim-A","Stim-C","Stim-B", "Stim-D"))).

Value

a named list of flowSet or GatingSet objects respectively.

Author

Dillon Hammill, Dillon.Hammill@anu.edu.au

Examples

# Load in CytoExploreRData to access data library(CytoExploreRData) # Group flowSet by Treatment cyto_group_by(Activation, "Treatment")
#> $`Stim-A` #> A flowSet with 8 experiments. #> #> column names(18): FSC-A FSC-H ... APC-Cy7-A Time #> #> #> $`Stim-B` #> A flowSet with 8 experiments. #> #> column names(18): FSC-A FSC-H ... APC-Cy7-A Time #> #> #> $`Stim-C` #> A flowSet with 8 experiments. #> #> column names(18): FSC-A FSC-H ... APC-Cy7-A Time #> #> #> $`Stim-D` #> A flowSet with 8 experiments. #> #> column names(18): FSC-A FSC-H ... APC-Cy7-A Time #> #> #> $`NA` #> A flowSet with 1 experiments. #> #> column names(18): FSC-A FSC-H ... APC-Cy7-A Time #> #>
# Group GatingSet by Treatment and OVAConc gs <- GatingSet(Activation) cyto_group_by(gs, c("Treatment", "OVAConc"))
#> $`NA 0` #> A GatingSet with 1 samples #> #> $`Stim-A 0` #> A GatingSet with 2 samples #> #> $`Stim-A 5` #> A GatingSet with 2 samples #> #> $`Stim-A 50` #> A GatingSet with 2 samples #> #> $`Stim-A 500` #> A GatingSet with 2 samples #> #> $`Stim-B 0` #> A GatingSet with 2 samples #> #> $`Stim-B 5` #> A GatingSet with 2 samples #> #> $`Stim-B 50` #> A GatingSet with 2 samples #> #> $`Stim-B 500` #> A GatingSet with 2 samples #> #> $`Stim-C 0` #> A GatingSet with 2 samples #> #> $`Stim-C 5` #> A GatingSet with 2 samples #> #> $`Stim-C 50` #> A GatingSet with 2 samples #> #> $`Stim-C 500` #> A GatingSet with 2 samples #> #> $`Stim-D 0` #> A GatingSet with 2 samples #> #> $`Stim-D 5` #> A GatingSet with 2 samples #> #> $`Stim-D 50` #> A GatingSet with 2 samples #> #> $`Stim-D 500` #> A GatingSet with 2 samples #>