Learn R Programming

rapportools (version 1.2)

name: Variable Name

Description

This function returns character value previously stored in variable's name attribute. If none found, the function defaults to object's name.

Usage

name(x)

Value

a character value with variable's label

Arguments

x

an R (atomic or data.frame/list) object to extract names from

Examples

Run this code
if (FALSE) {
name(mtcars$am)
x <- 1:10
name(x)
}

Run the code above in your browser using DataLab