Rename columns in a flowFrame
Usage
# S3 method for flowFrame
rename_with(.data, .fn, .cols = dplyr::everything(), ...)
Arguments
- .data
- .fn
A function used to transform the selected .cols. Should return a character vector the same length as the input.
- .cols
Unquoted column names indicating which columns to rename (as specified by
featureNames
).- ...
Additional arguments passed onto .fn.
Value
An object of the same type as .data. The output has the following properties:
* Rows are not affected.
* Column names are changed; column order is preserved.
* The flowFrame
's identifier
will be preserved.
Examples
my_flowframe <- simulate_cytometry_data()$flowframe
my_flowframe |>
dplyr::rename_with(.fn = toupper)
#> flowFrame object 'V1'
#> with 100 cells and 10 observables:
#> name desc range minRange maxRange
#> $P1 FEATURE_1 FEATURE_1 100 0 99
#> $P2 FEATURE_2 FEATURE_2 101 0 100
#> $P3 FEATURE_3 FEATURE_3 100 0 99
#> $P4 FEATURE_4 FEATURE_4 101 0 100
#> $P5 FEATURE_5 FEATURE_5 97 0 96
#> $P6 FEATURE_6 FEATURE_6 98 0 97
#> $P7 FEATURE_7 FEATURE_7 101 0 100
#> $P8 FEATURE_8 FEATURE_8 97 0 96
#> $P9 FEATURE_9 FEATURE_9 101 0 100
#> $P10 FEATURE_10 FEATURE_10 101 0 100
#> 88 keywords are stored in the 'description' slot