checkmate: Fast and Versatile Argument Checks

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.

Install the latest version of this package by entering the following in R:
AuthorMichel Lang [cre, aut], Bernd Bischl [ctb]
Date of publication2016-11-02 18:15:25
MaintainerMichel Lang <>
LicenseBSD_3_clause + file LICENSE

View on CRAN

Man pages

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

checkEnvironment: Check if an argument is an environment

checkFactor: Check if an argument is a factor

checkFileExists: Check existence and access rights of files

checkFlag: Check if an argument is a flag

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: Fast and Versatile Argument Checks

checkMatrix: Check if an argument is a matrix

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

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

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

vname: Lookup a variable name

wf: Get the index of the first/last TRUE


\%??\% Man page
allMissing Man page
anyInfinite Man page
anyMissing Man page
anyNaN Man page
asCount Man page
asInt Man page
asInteger Man page
assert Man page
assert_access Man page
assertAccess Man page
assert_array Man page
assertArray Man page
assert_atomic Man page
assertAtomic Man page
assert_atomic_vector Man page
assertAtomicVector Man page
assert_character Man page
assertCharacter Man page
assert_choice Man page
assertChoice Man page
assert_class Man page
assertClass Man page
AssertCollection Man page
assert_complex Man page
assertComplex Man page
assert_count Man page
assertCount Man page
assert_data_frame Man page
assertDataFrame Man page
assert_data_table Man page
assertDataTable Man page
assert_date Man page
assertDate Man page
assert_directory Man page
assertDirectory Man page
assert_directory_exists Man page
assertDirectoryExists Man page
assert_environment Man page
assertEnvironment Man page
assert_factor Man page
assertFactor Man page
assert_file Man page
assertFile Man page
assert_file_exists Man page
assertFileExists Man page
assert_flag Man page
assertFlag Man page
assert_function Man page
assertFunction Man page
assert_int Man page
assertInt Man page
assert_integer Man page
assertInteger Man page
assert_integerish Man page
assertIntegerish Man page
assert_list Man page
assertList Man page
assert_logical Man page
assertLogical Man page
assert_matrix Man page
assertMatrix Man page
assert_named Man page
assertNamed Man page
assert_names Man page
assertNames Man page
assert_null Man page
assertNull Man page
assert_number Man page
assertNumber Man page
assert_numeric Man page
assertNumeric Man page
assert_os Man page
assertOS Man page
assert_path_for_output Man page
assertPathForOutput Man page
assert_scalar Man page
assertScalar Man page
assert_scalar_na Man page
assertScalarNA Man page
assert_set_equal Man page
assertSetEqual Man page
assert_string Man page
assertString Man page
assert_subset Man page
assertSubset Man page
assert_tibble Man page
assertTibble Man page
assert_vector Man page
assertVector Man page
check_access Man page
checkAccess Man page
check_array Man page
checkArray Man page
check_atomic Man page
checkAtomic Man page
check_atomic_vector Man page
checkAtomicVector Man page
check_character Man page
checkCharacter Man page
check_choice Man page
checkChoice Man page
check_class Man page
checkClass Man page
check_complex Man page
checkComplex Man page
check_count Man page
checkCount Man page
check_data_frame Man page
checkDataFrame Man page
check_data_table Man page
checkDataTable Man page
check_date Man page
checkDate Man page
checkDirectory Man page
check_directory_exists Man page
checkDirectoryExists Man page
check_environment Man page
checkEnvironment Man page
check_factor Man page
checkFactor Man page
checkFile Man page
check_file_exists Man page
checkFileExists Man page
check_flag Man page
checkFlag Man page
check_function Man page
checkFunction Man page
check_int Man page
checkInt Man page
check_integer Man page
checkInteger Man page
check_integerish Man page
checkIntegerish Man page
check_list Man page
checkList Man page
check_logical Man page
checkLogical Man page
checkmate Man page
checkmate-package Man page
check_matrix Man page
checkMatrix Man page
check_named Man page
checkNamed Man page
check_names Man page
checkNames Man page
check_null Man page
checkNull Man page
check_number Man page
checkNumber Man page
check_numeric Man page
checkNumeric Man page
check_os Man page
checkOS Man page
check_path_for_output Man page
checkPathForOutput Man page
check_scalar Man page
checkScalar Man page
check_scalar_na Man page
checkScalarNA Man page
check_set_equal Man page
checkSetEqual Man page
check_string Man page
checkString Man page
check_subset Man page
checkSubset Man page
check_tibble Man page
checkTibble Man page
check_vector Man page
checkVector Man page
expect_access Man page
expect_array Man page
expect_atomic Man page
expect_atomic_vector Man page
expect_character Man page
expect_choice Man page
expect_class Man page
expect_complex Man page
expect_count Man page
expect_data_frame Man page
expect_data_table Man page
expect_date Man page
expect_directory Man page
expect_directory_exists Man page
expect_environment Man page
expect_factor Man page
expect_file Man page
expect_file_exists Man page
expect_flag Man page
expect_function Man page
expect_int Man page
expect_integer Man page
expect_integerish Man page
expect_list Man page
expect_logical Man page
expect_matrix Man page
expect_names Man page
expect_number Man page
expect_numeric Man page
expect_os Man page
expect_path_for_output Man page
expect_scalar Man page
expect_scalar_na Man page
expect_set_equal Man page
expect_string Man page
expect_subset Man page
expect_tibble Man page
expect_vector Man page
makeAssertCollection Man page
makeAssertion Man page
makeAssertionFunction Man page
makeExpectation Man page
makeExpectationFunction Man page
makeTest Man page
makeTestFunction Man page
matchArg Man page
qassert Man page
qassertr Man page
qexpect Man page
qexpectr Man page
qtest Man page
qtestr Man page
reportAssertions Man page
test_access Man page
testAccess Man page
test_array Man page
testArray Man page
test_atomic Man page
testAtomic Man page
test_atomic_vector Man page
testAtomicVector Man page
test_character Man page
testCharacter Man page
test_choice Man page
testChoice Man page
test_class Man page
testClass Man page
test_complex Man page
testComplex Man page
test_count Man page
testCount Man page
test_data_frame Man page
testDataFrame Man page
test_data_table Man page
testDataTable Man page
test_date Man page
testDate Man page
test_directory Man page
testDirectory Man page
test_directory_exists Man page
testDirectoryExists Man page
test_environment Man page
testEnvironment Man page
test_factor Man page
testFactor Man page
testFile Man page
test_file_exists Man page
testFileExists Man page
test_flag Man page
testFlag Man page
test_function Man page
testFunction Man page
test_int Man page
testInt Man page
test_integer Man page
testInteger Man page
test_integerish Man page
testIntegerish Man page
test_list Man page
testList Man page
test_logical Man page
testLogical Man page
test_matrix Man page
testMatrix Man page
test_named Man page
testNamed Man page
test_names Man page
testNames Man page
test_null Man page
testNull Man page
test_number Man page
testNumber Man page
test_numeric Man page
testNumeric Man page
test_os Man page
testOS Man page
test_path_for_output Man page
testPathForOutput Man page
test_scalar Man page
testScalar Man page
test_scalar_na Man page
testScalarNA Man page
test_set_equal Man page
testSetEqual Man page
test_string Man page
testString Man page
test_subset Man page
testSubset Man page
test_tibble Man page
testTibble Man page
test_vector Man page
testVector Man page
vname Man page
wf Man page
wl Man page


tests/testthat/test_checkCharacter.R tests/testthat/test_qassertr.R tests/testthat/test_checkCount.R tests/testthat/test_AssertCollection.R tests/testthat/test_checkNull.R tests/testthat/test_interoperability.R tests/testthat/test_messages.R tests/testthat/test_checkDataTable.R tests/testthat/test_checkSubset.R tests/testthat/test_anyNaN.R tests/testthat/test_checkScalarNA.R tests/testthat/test_checkFilesystem.R tests/testthat/test_checkNames.R tests/testthat/test_checkScalar.R tests/testthat/test_checkString.R tests/testthat/test_matchArg.R tests/testthat/test_checkComplex.R tests/testthat/test_makeFunction.R tests/testthat/test_include.R tests/testthat/test_checkNumeric.R tests/testthat/test_wf.R tests/testthat/test_checkInteger.R tests/testthat/test_checkMatrix.R tests/testthat/test_qassert.R tests/testthat/test_checkFactor.R tests/testthat/test_checkTibble.R tests/testthat/test_checkArray.R tests/testthat/test_checkInt.R tests/testthat/test_assert.R tests/testthat/test_checkClass.R tests/testthat/test_checkNamed.R tests/testthat/test_checkChoice.R tests/testthat/helper.R tests/testthat/test_asType.R tests/testthat/test_checkAtomic.R tests/testthat/test_checkLogical.R tests/testthat/test_checkNumber.R tests/testthat/test_checkAtomicVector.R tests/testthat/test_anyMissing.R tests/testthat/test_checkDate.R tests/testthat/test_checkFlag.R tests/testthat/test_anyInfinite.R tests/testthat/test_guessType.R tests/testthat/test_checkSetEqual.R tests/testthat/test_checkVector.R tests/testthat/test_checkIntegerish.R tests/testthat/test_checkDataFrame.R tests/testthat/test_checkFunction.R tests/testthat/test_checkList.R tests/testthat/test_checkEnvironment.R tests/testthat/test_checkOS.R tests/testthat/test_deparse.R tests/test-all.R
R/checkNumber.R R/checkAccess.R R/checkAtomicVector.R R/checkCharacter.R R/matchArg.R R/makeExpectation.R R/coalesce.R R/checkInt.R R/checkIntegerish.R R/checkDataTable.R R/checkSetEqual.R R/makeTest.R R/checkLogical.R R/asInteger.R R/makeAssertion.R R/checkComplex.R R/assert.R R/vname.R R/checkFileExists.R R/isIntegerish.R R/checkCount.R R/checkAtomic.R R/checkScalar.R R/wfwl.R R/checkList.R R/checkSubset.R R/qassert.R R/checkDataFrame.R R/checkPathForOutput.R R/checkNull.R R/checkFunction.R R/checkVector.R R/qassertr.R R/checkNamed.R R/checkFlag.R R/checkDirectoryExists.R R/checkDate.R R/checkString.R R/checkClass.R R/helper.R R/checkNames.R R/allMissing.R R/checkTibble.R R/checkChoice.R R/checkMatrix.R R/checkOS.R R/checkInteger.R R/checkNumeric.R R/checkFactor.R R/checkEnvironment.R R/anyNaN.R R/checkScalarNA.R R/checkArray.R R/zzz.R R/anyMissing.R R/AssertCollection.R R/anyInfinite.R
man/checkIntegerish.Rd man/vname.Rd man/checkCharacter.Rd man/checkNames.Rd man/qassert.Rd man/checkPathForOutput.Rd man/makeAssertion.Rd man/checkArray.Rd man/anyMissing.Rd man/checkString.Rd man/assert.Rd man/checkAtomic.Rd man/checkChoice.Rd man/checkDate.Rd man/checkNumeric.Rd man/anyNaN.Rd man/checkNull.Rd man/checkDataFrame.Rd man/matchArg.Rd man/checkDataTable.Rd man/checkScalarNA.Rd man/checkSetEqual.Rd man/checkClass.Rd man/checkCount.Rd man/checkComplex.Rd man/checkInt.Rd man/qassertr.Rd man/checkVector.Rd man/checkEnvironment.Rd man/makeTest.Rd man/checkSubset.Rd man/checkOS.Rd man/checkmate-package.Rd man/checkScalar.Rd man/checkNumber.Rd man/checkFlag.Rd man/checkInteger.Rd man/checkList.Rd man/coalesce.Rd man/checkMatrix.Rd man/makeExpectation.Rd man/checkDirectoryExists.Rd man/anyInfinite.Rd man/checkAtomicVector.Rd man/checkLogical.Rd man/checkFunction.Rd man/AssertCollection.Rd man/checkTibble.Rd man/wf.Rd man/checkAccess.Rd man/asInteger.Rd man/checkFileExists.Rd man/checkFactor.Rd man/checkNamed.Rd

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.