Skip to contents

Append new columns to colData of a SingleCellExperiment or SpatialExperiment object.

Usage

sce_add_spatial_colData(sce, df, replace = TRUE, spatial)

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).

spatial

A logical scalar: if TRUE add spatial quality control results

Value

A modified sce object with added columns.

Examples

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