getObjectClassNames: Retrieve Function Arguments.

Description Usage Arguments Value Author(s) Examples

View source: R/getObjectClassNames.R

Description

Use method getObjectClassNames to get the class names of an object ( see is.object). )

Usage

1
2
getObjectClassNames(object_o_1)
hasMainClass(object_o_1, classname_s_1)

Arguments

object_o_1

the object to analyze.

classname_s_1

the class to match the classname entry of the returned value of getObjectClassNames).

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_.

Author(s)

Fabien Gelineau <neonira@gmail.com>

Maintainer: Fabien Gelineau <neonira@gmail.com>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# 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"

neonira/wyz.code.offensiveProgramming documentation built on Feb. 20, 2020, 2:01 p.m.