Learn R Programming

yamlet (version 1.2.1)

alias.data.frame: Alias a Data Frame

Description

Aliases a data.frame. Replaces column names with labels, where present. Stores column name as 'alias' attribute.

Usage

# S3 method for data.frame
alias(object, ...)

Value

aliased data.frame

Arguments

object

data.frame

...

optional unquoted names of target columns

See Also

Other labels: append_units(), append_units.data.frame(), append_units.default(), drop_title(), drop_title.decorated(), drop_title.default(), drop_title.dvec(), make_title(), make_title.decorated(), make_title.default(), make_title.dvec(), sub_units()

Other deprecated: append_units(), drop_title(), make_title()

Examples

Run this code
library(magrittr)
d <- data.frame(x = 1:10, y = 1:10, z = 1:10)
d %<>% modify(x, label = 'Independent Value')
d %<>% modify(y, label = 'Dependent Value')
d
alias(d)
alias(d, y)

Run the code above in your browser using DataLab