arg_name: Extract Argument Name from an Expression

Description Usage Arguments Author(s) Examples

View source: R/utils.R

Description

Extract Argument Name from an Expression

Usage

1
arg_name(expr)

Arguments

expr

An expression created inside a function using substitute()

Author(s)

Thomas Neitmann, Ondrej Slama

Examples

1
2
3
4
5
6
7
8
test_fun <- function(something) {
  admiral:::arg_name(substitute(something))
}

inner_function <- function(x) x
test_fun2 <- function(something) {
  admiral:::arg_name(substitute(inner_function(something)))
}

epijim/admiral documentation built on Feb. 13, 2022, 12:15 a.m.