Skip to contents

Add a new column to the cellMetadata slot of a SpatialMap or Region object.

Usage

addCellMetadata(object, metadata, col.names = NULL, overwrite = T, ...)

Arguments

object

A SpatialMap or Region object

metadata

The metadata to add. A data.frame, vector, or list. If passing a data.frame with row names, or a named vector or list, these names will be used for indexing when adding the metadata.

col.names

New column names (if not already a data.frame)

overwrite

Whether to overwrite existing columns in case of a column name match

...

Arguments passed to .smapply

Value

A SpatialMap or Region object with metadata added to the object's cellMetadata slot.

Details

See vignette("AnalysisGuide3_Unsupervised_clustering") & vignette("AnalysisGuide6_Neighborhoods") for example workflows that make use of this function.

Scroll to top