Append new columns to colData
of a SingleCellExperiment
object.
Arguments
- sce
A
SingleCellExperiment
object.- df
A dataframe which will be binded column-wise to
colData(sce)
.- replace
A logical scalar: if
TRUE
and columns to be added already exist, they will be first removed fromcolData(sce)
.
Examples
if (FALSE) {
df <- data.frame(example = rownames(colnames))
sce <- sce_add_colData(sce, df = df)
}