Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

get_name_in_parent

Get the name of a variable in the parent frame


Description

Gets the name of the input in the parent frame.

Usage

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

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

A Lightweight Core of the 'assertive' Package

v0.0-9
GPL (>= 3)
Authors
Richard Cotton [aut, cre], Sunkyu Choi [trl], Ivanka Skakun [trl], Gergely Dar<c3><b3>czi [trl], Anton Antonov [trl], Hisham Ben Hamidane [trl], Anja Billing [trl], Aditya Bhagwat [trl], Rasmus B<c3><a5><c3><a5>th [trl], Mine Cetinkaya-Rundel [trl], Aspasia Chatziefthymiou [trl]
Initial release
2021-02-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.