Learn R Programming

tatoo (version 1.1.2)

is_class: Check if object is of a certain class

Description

These functions are designed to be used in combination with the assertthat package

Usage

is_class(dat, class)

assert_class(dat, class)

dat %assert_class% class

Value

`is_class()` returns `TRUE`/`FALSE`, `assert_class()` returns `TRUE` or fails with an error message.

Arguments

dat

any R object

class

the class to be checked for

Details

`is_class returns()` `TRUE`/`FALSE`. It comes with a on_failure function and is designed to be used in conjunction with the assertthat package. `assert_class()` and its infix version