Learn R Programming

wyz.code.offensiveProgramming (version 1.1.24)

getObjectClassNames: Retrieve Function Arguments.

Description

Retrieve the class names of an object ( see is.object). )

Usage

getObjectClassNames(object_o_1)
hasMainClass(object_o_1, classname_s_1)

Value

A list with two character entries. First one is named classname, provides the main classname (the one found in first position). Second one is named classnames, provides all the class names born by the object.

Arguments

object_o_1

the object to analyze.

classname_s_1

a string that is the class name to match the classname entry returned by getObjectClassNames.

Author

tools:::Rd_package_author("wyz.code.offensiveProgramming")

Maintainer: tools:::Rd_package_maintainer("wyz.code.offensiveProgramming")

Examples

Run this code
# typical test
getObjectClassNames(getObjectClassNames(factor(letters[1:3])))
#$classname
#[1] "factor"

#$classnames
#[1] "factor"

# another test
getObjectClassNames(new.env())
#$classname
#[1] NA

#$classnames
#[1] "environment"

Run the code above in your browser using DataLab