Learn R Programming

ufs (version 0.5.12)

extractVarName: Extract variable names

Description

Functions often get passed variables from within dataframes or other lists. However, printing these names with all their dollar signs isn't very userfriendly. This function simply uses a regular expression to extract the actual name.

Usage

extractVarName(x)

Value

The actual variables name, with all containing objectes stripped off.

Arguments

x

A character vector of one or more variable names.

Author

Gjalt-Jorn Peters

Maintainer: Gjalt-Jorn Peters gjalt-jorn@userfriendlyscience.com

Examples

Run this code

extractVarName('mtcars$mpg');

Run the code above in your browser using DataLab