rename.SummarizedExperiment: Rename variables by name for rowData or colData

View source: R/dplyr.R

rename.SummarizedExperimentR Documentation

Rename variables by name for rowData or colData

Description

Choose variables from the rowData or colData that you want to rename. Rename keeps all other variables.

Usage

## S3 method for class 'SummarizedExperiment'
rename(.data, axis, ...)

Arguments

.data

SummarizedExperiment to subset

axis

The axis to perform the operation on. Either row or col.

...

One or more unquoted expressions separated by commas. You can treat variable names like they are positions, so you can use expressions like x:y to select ranges of variables.

Positive values select variables; negative values drop variables. If the first expression is negative, select() will automatically start with all variables.

Use named arguments, e.g. new_name = old_name, to rename selected variables.

The arguments in ... are automatically quoted and evaluated in a context where column names represent column positions. They also support unquoting and splicing. See vignette("programming") for an introduction to these concepts.

See select helpers for more details and examples about tidyselect helpers such as starts_with(), everything(), ...

Value

A SummarizedExperiment after the rename operation

Examples

# rename the time variable after changing it to minutes
data(seq_se)
seq_se %>% mutate(col, time = (time * 60)) %>% rename(col, time_mins = time)

martijnvanattekum/cleanse documentation built on Nov. 20, 2023, 8:28 p.m.