Skip to contents

Summarize a flowSet.

Usage

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

Arguments

.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::summarize(feature_1_mean = mean(feature_1))
#> # A tibble: 5 × 4
#>   feature_1_mean .flowframe_identifier patient   cell_type   
#>            <dbl> <chr>                 <chr>     <chr>       
#> 1           47.7 V1                    patient_1 population_a
#> 2           54.0 V2                    patient_1 population_b
#> 3           51.2 V3                    patient_2 population_a
#> 4           51.2 V4                    patient_2 population_b
#> 5           50.9 V5                    patient_3 population_a