is_class: Is class

Description Usage Arguments Examples

Description

Tests if an object is of a given class

Usage

1

Arguments

x

an R object

name

string giving the class to be tested

Examples

1
2
3
4
5
6
is_class("test_me", "character") # TRUE
is_class(1:10, "numeric") # TRUE

y = 'hello'
class(y) = "hello"
is_class(y, 'hello')

gastonstat/tester documentation built on May 16, 2019, 6:38 p.m.