Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

checkListElementClass

Check that a list contains only elements of a required type.


Description

Check that argument is a list and contains only elements of a required type. Throws exception if check is not passed. Note that argument is evaluated when checked.

Usage

checkListElementClass(xs, cl)

Arguments

xs

[list]
Argument.

cl

[character(1)]
Class that elements must have. Checked with is.

Value

Nothing.

Examples

xs = as.list(1:3)
checkListElementClass(xs, "numeric")

BBmisc

Miscellaneous Helper Functions for B. Bischl

v1.11
BSD_2_clause + file LICENSE
Authors
Bernd Bischl [aut, cre], Michel Lang [aut], Jakob Bossek [aut], Daniel Horn [aut], Jakob Richter [aut], Dirk Surmann [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.