Checks if all slots of the given list are of the same class.

is.listOf(object, obj.class = NULL)

Arguments

object

A list

obj.class

The name of the class to search in items of the list.

Value

A character(1) with the name of the package or NULL

Examples

ll <- as.list(LETTERS[1:3])
is.listOf(ll, "data.frame")
#> [1] FALSE
is.listOf(ll, "character")
#> [1] TRUE