getVariableName: Return a variable name

Description Usage Arguments Value Author(s) Examples

View source: R/getVariableName.R

Description

Return the name of variable varname in call match_call.

Usage

1
  getVariableName(match_call, varname)

Arguments

match_call

An object of class call, as returned by match.call.

varname

An character of length 1 which is looked up in match_call.

Value

A character with the name of the variable passed as parameter varname in parent close of match_call.

Author(s)

Laurent Gatto

Examples

1
2
3
4
5
a <- 1
f <- function(x, y)
 getVariableName(match.call(), "x")
f(x = a)
f(y = a)

lgatto/tipsntRicks documentation built on May 21, 2019, 6:08 a.m.