assertive.types v0.0-3


Monthly downloads



Assertions to Check Types of Variables

A set of predicates and assertions for checking the types of variables. This is mainly for use by other package developers who want to include run-time testing features in their own packages. End-users will usually want to use assertive directly.


Project Status: Active - The project has reached a stable, usable state and is being actively developed. Is the package on CRAN? SemaphoreCI Build Status AppVeyor Build Status


A set of predicates and assertions for checking the types of variables. Most of the documentation is on the assertive page. End-users will usually want to use assertive directly.


To install the stable version, type:


To install the development version, you first need the devtools package.


Then you can install the assertive.types package using



All the predicates in this package check for objects of specific types.

Wrappers to functions in base:

is_array, is_call, is_character, is_complex, is_data.frame, is_environment, is_expression, is_factor, is_function, is_integer, is_language, is_list, is_logical, is_matrix, is_name/is_symbol, is_numeric, is_ordered, is_primitive, is_qr, is_raw, is_s4, and is_table.

Wrappers to functions in grDevices:


Wrappers to functions in methods:


Wrappers to functions in stats:

is_leaf, is_mts, is_stepfun, is_ts, is_tskernel.

Wrappers to functions in utils:



Predicates that return a vector have two corresponding assertions. For example, is_class has assert_all_are_classes and assert_any_are_classes.

Predicates returning a single logical value have one corresponding assertion. For example, is_array has assert_is_array.

Functions in assertive.types

Name Description
assert_is_array Is the input an array or matrix?
assert_is_a_string Is the input of type character?
assert_is_data.frame Is the input is a data.frame?
assert_is_closure_function Is the input a closure, builtin or special function?
assert_is_a_complex Is the input complex?
assert_is_environment Is the input an environment?
assert_is_data.table Is the input a data.table?
assert_all_are_classes Is the input the name of a (formally defined) class?
assert_is_all_of Does x belong to these classes?
assert_is_date Is the input a date?
assert_is_formula Is the input a formula?
assert_is_function Is the input a function?
assert_is_leaf Is the input a (dendrogram) leaf?
assert_is_list Is the input a list?
assert_is_internal_function Is the input an internal function?
assert_is_factor Is the input a factor?
assert_is_externalptr Is the input is an external pointer?
assert_is_call Is the input a language object?
assert_is_inherited_from Does the object inherit from some class?
assert_is_an_integer Is the input an integer?
assert_is_a_bool Is the input logical?
assert_is_try_error Is the input a condition?
assert_is_mts Is the input a time series?
assert_is_a_double Is the input numeric?
assert_is_tbl Is the input a tbl?
assert_is_table Is the input a table?
assert_is_S4 Is the input an S4 object?
assert_is_s3_generic Is the input an S3 generic or method?
assert_is_a_raw Is the input raw?
assert_is_relistable Is the input relistable?
assert_is_raster Is the input a raster?
assert_is_qr Is the input a QR decomposition of a matrix?
No Results!

Last month downloads


Type Package
Date 2016-12-30
License GPL (>= 3)
LazyLoad yes
LazyData yes
Acknowledgments Development of this package was partially funded by the Proteomics Core at Weill Cornell Medical College in Qatar . The Core is supported by 'Biomedical Research Program' funds, a program funded by Qatar Foundation.
Collate 'imports.R' 'assert-is-a-type.R' 'assert-is-condition.R' 'assert-is-date.R' 'assert-is-formula.R' 'assert-is-function.R' 'assert-is-type-base.R' 'assert-is-type-data.table.R' 'assert-is-type-dplyr.R' 'assert-is-type-grDevices.R' 'assert-is-type-methods.R' 'assert-is-type-stats.R' 'assert-is-type-utils.R' 'is-a-type.R' 'is-condition.R' 'is-date.R' 'is-formula.R' 'is-function.R' 'is-type-base.R' 'is-type-data.table.R' 'is-type-dplyr.R' 'is-type-grDevices.R' 'is-type-methods.R' 'is-type-stats.R' 'is-type-utils.R'
RoxygenNote 5.0.1
ByteCompile true
NeedsCompilation no
Packaged 2016-12-30 17:23:20 UTC; richierocks
Repository CRAN
Date/Publication 2016-12-30 19:35:46

Include our badge in your README