| get_alias {atable} | R Documentation |
Get Aliases of column names
Description
Retrieves attributes label and units of class labelled and attribute alias otherwise.
Usage
get_alias(x, ...)
## S3 method for class 'labelled'
get_alias(x, ...)
## Default S3 method:
get_alias(x, ...)
## S3 method for class 'data.frame'
get_alias(x, ...)
## S3 method for class 'list'
get_alias(x, ...)
Arguments
x |
An object. Aliases will be retrieved of |
... |
Passed from and to other methods. |
Details
We use attributes here, to assign alternative names to columns.
Also class labelled created by Hmisc's label is supported.
This is a workhorse function, see create_alias_mapping for the high level function
Value
For atomic vectors a character of NULL; for non-atomic vectors the results of get_alias applied to its elements.
Methods (by class)
-
get_alias(labelled): Retrieve attributeslabelandunits, if available. Units are bracketed by '[]'. See alsolabelandunits. The user may alter this method viaatable_options, see help there. -
get_alias(default): Retrieve attributealiasviaattr. This attribute may be an arbitrary character. If there is no attributealias, thenget_alias.defaultreturnsNULL. -
get_alias(data.frame): Callsget_aliason every column. -
get_alias(list): Callsget_aliason every element of the list.