get_name_in_parent: Get the name of a variable in the parent frame

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Gets the name of the input in the parent frame.

Usage

1
get_name_in_parent(x, escape_percent = TRUE)

Arguments

x

Variable to get the name of.

escape_percent

Logical. If TRUE, percent signs are doubled, making the value suitable for use with sprintf (and hence by false and na).

Value

A string giving the name of the input in the parent frame.

Examples

1
2
3
4
5
6
7
8
outside <- 1
f <- function(inside, escape_percent) 
{
  get_name_in_parent(inside, escape_percent)
}
f(outside, TRUE) 
f('10%', TRUE) 
f('10%', FALSE)

assertive.base documentation built on Feb. 8, 2021, 9:06 a.m.