grapes-is-grapes: Test for class membership

Description Usage Arguments Value Examples

Description

Test for class membership

Test whether a match object is not a member of a particular class.

Usage

1
2
3
match_object %is% expected_class

match_object %isnot% expected_class

Arguments

match_object

ANY. The object to test for class.

expected_class

character. The name of the expected class.

Value

Boolean whether or not the match_object is the expected_class.

Examples

1
2
3
4
5
6
7
  1 %is% numeric
  1.0 %is% double
  1L %is% integer
  iris %is% dataframe
  c("a", "b", "c") %is% vector
  "pizza" %is% simple_string
  list(a = "pizza", b = "pie") %is% c("character", "list")

peterhurford/checkr documentation built on May 25, 2019, 1:50 a.m.