Learn R Programming

interfacer (version 0.3.3)

type.of_type: Check for a given class

Description

Any values of the wrong class will cause failure of validation. This is particularly useful for custom vectors of for list types (e.g. list(of_type(lm)))

Usage

type.of_type(type, .not_null = FALSE)

Value

a function that can check the input is of the correct type.

Arguments

type

the class of the type we are checking as a symbol

.not_null

are NULL values allowed (for list column entries only)