Skip to contents

Get the types of all items in a list

Usage

is.items(list, ..., FUN = is)

Arguments

list

A list to get the types from

...

pairlist Additional arguments to FUN

FUN

function or character Either a function, or the name of a function which returns a single logical value. The default function uses is, specify the desired type in .... You can also use other type checking functions such as is.character, is.numeric, or is.data.frame.

Value

logical A vector indicating if the list item is the specified type.

Examples

list <- list(c(1,2,3), c('a','b','c'))
is.items(list, 'character')
#> [1] FALSE  TRUE