Skip to contents

Summarize a flowSet.

Usage

# S3 method for flowSet
summarise(.data, ..., .by = NULL, .groups = NULL)

Arguments

.data

.data A flowSet

...

Name-value pairs of summary functions. The name will be the name of the variable in the result.

.by

Optionally, a selection of columns to group by for just this operation, functioning as an alternative to group_by().

.groups

Grouping structure of the result. * "drop_last": dropping the last level of grouping. * "drop": All levels of grouping are dropped. * "keep": Same grouping structure as .data. * "rowwise": Each row is its own group.

Value

A data.frame containing the summarized result.

Examples

my_flowset <- simulate_cytometry_data()$flowset

my_flowset |>
  dplyr::summarise(feature_1_mean = mean(feature_1))
#> # A tibble: 5 × 4
#>   feature_1_mean .flowframe_identifier patient   cell_type   
#>            <dbl> <chr>                 <chr>     <chr>       
#> 1           55.6 V1                    patient_1 population_a
#> 2           49.1 V2                    patient_1 population_b
#> 3           48.0 V3                    patient_2 population_a
#> 4           49.1 V4                    patient_2 population_b
#> 5           54.4 V5                    patient_3 population_a