Vek

Predicate Helper Functions for Testing Atomic Vectors in R

Installation

install.packages("vek")

About

All functions take a single argument x and check whether it's of the target type of base-R atomic vector, returning TRUE or FALSE. Some additionally check for value. Classes that extend any base-R atomic vector return FALSE. Vectors that carry any attributes other than 'names' return FALSE.

Function names may include a suffix that encodes what additional conditions are evaluated. A select combination of these conditions is provided for each type. Naming scheme:

For example:

Supported types: logical, integer, double, numeric, and character.