IsNamedList: Check List Names

View source: R/utils.R View source: R/utils.R

IsNamedListR Documentation

Check List Names

Description

Check to see if a list has names; also check to enforce that all names are present and unique

Usage

IsNamedList(x, all.unique = TRUE, allow.empty = FALSE, pass.zero = FALSE)

Arguments

x

A list

all.unique

Require that all names are unique from one another

allow.empty

Allow empty (nchar = 0) names

pass.zero

Pass on zero-length lists

Value

TRUE if ..., otherwise FALSE

Examples

IsNamedList(list())
IsNamedList(list(), pass.zero = TRUE)
IsNamedList(list(1, 2, 3))
IsNamedList(list(a = 1, b = 2, c = 3))
IsNamedList(list(a = 1, 2, c = 3))
IsNamedList(list(a = 1, 2, c = 3), allow.empty = TRUE)
IsNamedList(list(a = 1, a = 2, a = 3))
IsNamedList(list(a = 1, a = 2, a = 3), all.unique = FALSE)


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