set_obs: Set unstructured data

View source: R/set_obs.R

set_obsR Documentation

Set unstructured data

Description

Set the sample observations slot (i.e. cell metadata) in any single-cell object that has one.

Usage

set_obs(obj, obs, verbose = TRUE)

Arguments

obj

A single-cell object supported by scKirby. See converters for a table of all supported conversions.

obs

Observation metadata as a data.frame with samples as row names.

verbose

Print messages.

Value

Single-cell object.

Examples

obj <- example_obj("ad")
obs <- get_obs(obj)
obs$new_col <- c(1,2)
obj2 <- set_obs(obj = obj,
                obs = obs)

bschilder/scKirby documentation built on Oct. 2, 2024, 10:16 p.m.