R: checkmate: Fast and Versatile Argument Checks

checkmate-package {checkmate} | R Documentation

## checkmate: Fast and Versatile Argument Checks

### Description

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.

### Check scalars

- `checkFlag`

- `checkCount`

- `checkNumber`

- `checkInt`

- `checkString`

- `checkScalar`

- `checkScalarNA`

### Check vectors

- `checkLogical`

- `checkNumeric`

- `checkDouble`

- `checkInteger`

- `checkIntegerish`

- `checkCharacter`

- `checkComplex`

- `checkFactor`

- `checkList`

- `checkPOSIXct`

- `checkVector`

- `checkAtomic`

- `checkAtomicVector`

- `checkRaw`

### Check attributes

- `checkClass`

- `checkMultiClass`

- `checkNames`

- `checkNamed` (deprecated)

### Check compound types

- `checkArray`

- `checkDataFrame`

- `checkMatrix`

### Check other built-in R types

- `checkDate`

- `checkEnvironment`

- `checkFunction`

- `checkFormula`

- `checkNull`

### Check sets

- `checkChoice`

- `checkSubset`

- `checkSetEqual`

- `checkDisjunct`

### File IO

- `checkFileExists`

- `checkDirectoryExists`

- `checkPathForOutput`

- `checkAccess`

### Popular data types of third party packages

- `checkDataTable`

- `checkR6`

- `checkTibble`

### Safe coercion to integer

- `asCount`

- `asInt`

- `asInteger`

### Quick argument checks using a DSL

- `qassert`

- `qassertr`

### Misc

- `checkOS` (check operating system)

- `assert` (combine multiple checks into an assertion)

- `anyMissing`

- `allMissing`

- `anyNaN`

- `wf` (which.first and which.last)

### Author(s)

Maintainer: Michel Lang michellang@gmail.com (ORCID)

Other contributors:

- Bernd Bischl bernd_bischl@gmx.net [contributor]

- Dénes Tóth toth.denes@kogentum.hu (ORCID) [contributor]

### See Also

Useful links:

- https://mllg.github.io/checkmate/

- https://github.com/mllg/checkmate

- Report bugs at https://github.com/mllg/checkmate/issues

[Package checkmate version 2.1.0 Index]