getname: getname returns the name of a variable as character

View source: R/rutils.R

getnameR Documentation

getname returns the name of a variable as character

Description

getname runs 'deparse(substitute(x))' to get the name of the input variable. Saves remembering the syntax

Usage

getname(x)

Arguments

x

any variable whose name is wanted as a character string

Value

a character string with the name of input variable

Examples

## Not run: 
a_variable <- c(1,2,3,4,5,6,7,8)
getname(a_variable)

## End(Not run)

haddonm/codeutils documentation built on April 15, 2024, 1:02 p.m.