Learn R Programming

wyz.code.offensiveProgramming (version 1.1.24)

getObjectFunctionNames: Retrieve Function Names From Object

Description

Retrieve function names of an object ( see is.object). )

Usage

getObjectFunctionNames(object_o_1, allNames_b_1 = FALSE)

getClassTypicalFunctionNames(object_o_1)

Value

A vector of function names (character).

Arguments

object_o_1

the object to analyze.

allNames_b_1

A boolean value. When TRUE, uses getClassTypicalFunctionNames to restrict the set of function names returned.

Author

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

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

Details

Function getClassTypicalFunctionNames gives back function names that are related to R class style, and automatically added by R to your class object.

Examples

Run this code
# typical test
MyEnv <- function() {
     self <- environment()
     class(self) <- append('MyEnv', class(self))
     f <- function(x_3, y_3n) x_3 + y_3n
     self
}

getObjectFunctionNames(MyEnv())
# [1] "f"

# another test
getObjectFunctionNames(new.env())
#[1] NA

Run the code above in your browser using DataLab