sce_add_colData: Append new columns to 'colData' of a 'SingleCellExperiment'...

View source: R/sce.R

sce_add_colDataR Documentation

Append new columns to colData of a SingleCellExperiment object.

Description

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

## Not run: 
df <- data.frame(example = rownames(colnames))
sce <- sce_add_colData(sce, df = df)

## End(Not run)


bioinfocz/scdrake documentation built on Sept. 19, 2024, 4:43 p.m.