listOf: Tests equality of list elements class

Description Usage Arguments Value Author(s) Examples

View source: R/utils.R

Description

Compares equality of all members of a list.

Usage

1
listOf(x, class, valid = TRUE)

Arguments

x

A codelist.

class

A character defining the expected class.

valid

A logical defining if all elements should be tested for validity. Default is TRUE.

Value

TRUE is all elements of x inherit from class.

Author(s)

Laurent Gatto

Examples

1
2
3
listOf(list(), "foo")
listOf(list("a", "b"), "character")
listOf(list("a", 1), "character")

MSnbase documentation built on Jan. 23, 2021, 2 a.m.