getObjectFunctionArgumentNames: Retrieve Function Arguments.

Description Usage Arguments Value Author(s) Examples

View source: R/getObjectFunctionArgumentNames.R

Description

Use method getObjectFunctionArgumentNames to get the function argument names of an object (see is.object).

Usage

1
getObjectFunctionArgumentNames(object_o_1, allNames_b_1 = TRUE)

Arguments

object_o_1

the object to analyze.

allNames_b_1

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

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.

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
# 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"

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