MSnbase (version 1.20.7)

listOf: 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.

Examples

Run this code
listOf(list(), "foo")
listOf(list("a", "b"), "character")
listOf(list("a", 1), "character")

Run the code above in your browser using DataLab