is.object
Test if an Object has a Class Attribute

Description

Checks if an object has a "class" attribute.

Usage

is.object(x)

Arguments

x any object.

Details

Tests whether an object has an explicit "class" attribute. This is not true for an object with an implicit class, such as a matrix with a "dim" attribute but no "class" attribute.
Value
returns a logical value. If TRUE, the input object has an explicit "class" attribute.
See Also
attr, class
Examples
is.object(1:4) # FALSE
is.object(structure(1:4, class="foo")) # TRUE
is.object(matrix(1:4, ncol=2)) #FALSE
Package base version 6.0.0-69
Package Index