rename,SummarizedExperiment-method | R Documentation |
SummarizedExperiment
ObjectsThis method renames columns of the rowData
and colData
, as well as assays, of
SummarizedExperiment::SummarizedExperiment
objects. This increases the flexibility
since renaming can be done before conversion to a HermesData
object.
## S4 method for signature 'SummarizedExperiment'
rename(
x,
row_data = character(),
col_data = character(),
assays = character(),
...
)
## S4 method for signature 'data.frame'
rename(x, ...)
x |
( |
row_data |
(named |
col_data |
(named |
assays |
(named |
... |
additional arguments (not used here). |
The SummarizedExperiment::SummarizedExperiment
object with renamed contents.
x <- summarized_experiment
# Use deliberately a non-standard assay name in this example.
assayNames(x) <- "count"
# Rename `HGNC` to `symbol` in the `rowData`.
x <- rename(x, row_data = c(symbol = "HGNC"))
head(names(rowData(x)))
# Rename `LowDepthFlag` to `low_depth_flag` in `colData`.
x <- rename(x, col_data = c(low_depth_flag = "LowDepthFlag"))
tail(names(colData(x)))
# Rename assay `count` to `counts`.
x <- rename(x, assays = c(counts = "count"))
assayNames(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.