Skip to contents

Append new columns to colData of a SingleCellExperiment object.

Usage

sce_add_colData(sce, df, replace = TRUE)

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 from colData(sce).

Value

A modified sce object with added columns.

Examples

if (FALSE) {
df <- data.frame(example = rownames(colnames))
sce <- sce_add_colData(sce, df = df)
}