substitute_deparse: Get Object Name as String

View source: R/Stringendo.R

substitute_deparseR Documentation

Get Object Name as String

Description

get_object_name() captures the name of an input object and returns it as a string. Replace ⁠deparse\s*\(\s*substitute\s*\(([^()]+)\)\s*\)⁠ to ⁠substitute_deparse($1)⁠, then ⁠substitute\s*\(([^()]+)\)\s*\)⁠ to the same.

Usage

substitute_deparse(x)

Arguments

x

The object whose name you want to capture.

Value

Returns the name of obj as a string.

Examples

my_var <- 10
get_object_name(my_var)  # "my_var"


vertesy/Stringendo documentation built on Nov. 10, 2024, 4:35 a.m.