listOf: Tests equality of list elements class

View source: R/utils.R

listOfR Documentation

Tests equality of list elements class

Description

Compares equality of all members of a list.

Usage

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

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

lgatto/MSnbase documentation built on March 14, 2024, 7:06 a.m.