dot-PropagateList: Propagate a List

.PropagateListR Documentation

Propagate a List

Description

Propagate a List

Usage

.PropagateList(x, names, default = NA)

Arguments

x

A list or character vector

names

A vector of names to keep from x

default

A default value for unassigned values of x

Value

A named list where the names are present in both x and names and the values are either the values from x or default

Examples

.PropagateList("counts", c("RNA", "ADT", "SCT"))
.PropagateList(c("counts", "data"), c("RNA", "ADT", "SCT"))
.PropagateList("ADT", c("RNA", "ADT", "SCT"))
.PropagateList(c("RNA", "SCT"), c("RNA", "ADT", "SCT"))
.PropagateList(c("RNA", ADT = "counts"), c("RNA", "ADT", "SCT"))
.PropagateList(list(SCT = c("counts", "data"), ADT = "counts"), c("RNA", "ADT", "SCT"))
.PropagateList(list(SCT = c("counts", "data"), "ADT"), c("RNA", "ADT", "SCT"))


mojaveazure/seurat-object documentation built on Dec. 13, 2024, 9:23 a.m.