Learn R Programming

wyz.code.offensiveProgramming (version 1.1.24)

getObjectFunctionArgumentNames: Retrieve Function Arguments.

Description

Retrieve function argument names from an object.

Usage

getObjectFunctionArgumentNames(object_o_1, allNames_b_1 = TRUE)

Value

A list. Entries are named with function names. Each entry is of type character, and holds function argument names. Could be empty if function takes no argument.

Arguments

object_o_1

the object to analyze.

allNames_b_1

A boolean value. Passed to function getObjectFunctionNames to restrict output if needed.

Author

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

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

See Also

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
}

getObjectFunctionArgumentNames(MyEnv())
#$f
#[1] "x_3" "y_3n"

Run the code above in your browser using DataLab