checkmate2.3.4 package

Fast and Versatile Argument Checks

anyInfinite

Check if an object contains infinite values

anyMissing

Check if an object contains missing values

anyNaN

Check if an object contains NaN values

asInteger

Convert an argument to an integer

assert

Combine multiple checks into one assertion

AssertCollection

Collect multiple assertions

checkAccess

Check file system access rights

checkArray

Check if an argument is an array

checkAtomic

Check that an argument is an atomic vector

checkAtomicVector

Check that an argument is an atomic vector

checkCharacter

Check if an argument is a vector of type character

checkChoice

Check if an object is an element of a given set

checkClass

Check the class membership of an argument

checkComplex

Check if an argument is a vector of type complex

checkCount

Check if an argument is a count

checkDataFrame

Check if an argument is a data frame

checkDataTable

Check if an argument is a data table

checkDate

Check that an argument is a Date

checkDirectoryExists

Check for existence and access rights of directories

checkDisjunct

Check if an argument is disjunct from a given set

checkDouble

Check that an argument is a vector of type double

checkEnvironment

Check if an argument is an environment

checkFactor

Check if an argument is a factor

checkFALSE

Check if an argument is FALSE

checkFileExists

Check existence and access rights of files

checkFlag

Check if an argument is a flag

checkFormula

Check if an argument is a formula

checkFunction

Check if an argument is a function

checkInt

Check if an argument is a single integerish value

checkInteger

Check if an argument is vector of type integer

checkIntegerish

Check if an object is an integerish vector

checkList

Check if an argument is a list

checkLogical

Check if an argument is a vector of type logical

checkmate-package

checkmate: Fast and Versatile Argument Checks

checkMatrix

Check if an argument is a matrix

checkMultiClass

Check the class membership of an argument

checkNamed

Check if an argument is named

checkNames

Check names to comply to specific rules

checkNull

Check if an argument is NULL

checkNumber

Check if an argument is a single numeric value

checkNumeric

Check that an argument is a vector of type numeric

checkOS

Check the operating system

checkPathForOutput

Check if a path is suited for creating an output file

checkPermutation

Check if the arguments are permutations of each other.

checkPOSIXct

Check that an argument is a date/time object in POSIXct format

checkR6

Check if an argument is an R6 class

checkRaw

Check if an argument is a raw vector

checkScalar

Check if an argument is a single atomic value

checkScalarNA

Check if an argument is a single missing value

checkSetEqual

Check if an argument is equal to a given set

checkString

Check if an argument is a string

checkSubset

Check if an argument is a subset of a given set

checkTibble

Check if an argument is a tibble

checkTRUE

Check if an argument is TRUE

checkVector

Check if an argument is a vector

coalesce

Coalesce operator

makeAssertion

Turn a Check into an Assertion

makeExpectation

Turn a Check into an Expectation

makeTest

Turn a Check into a Test

matchArg

Partial Argument Matching

qassert

Quick argument checks on (builtin) R types

qassertr

Quick recursive arguments checks on lists and data frames

register_test_backend

Select Backend for Unit Tests

vname

Lookup a variable name

wf

Get the index of the first/last TRUE

Tests and assertions to perform frequent argument checks. A substantial part of the package was written in C to minimize any worries about execution time overhead.

  • Maintainer: Michel Lang
  • License: BSD_3_clause + file LICENSE
  • Last published: 2026-02-03