listOf {MSnbase} | R 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")

[Package MSnbase version 2.18.0 Index]