get_alias | R Documentation |
Retrieves attributes label
and units
of class labelled and attribute alias
otherwise.
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, ...)
x |
An object. Aliases will be retrieved of |
... |
Passed from and to other methods. |
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
For atomic vectors a character of NULL
; for non-atomic vectors the results of get_alias
applied to its elements.
labelled
: Retrieve attributes label
and units
, if available.
Units are bracketed by '[]'. See also label
and units
.
The user may alter this method via atable_options
, see help there.
default
: Retrieve attribute alias
via attr
.
This attribute may be an arbitrary character.
If there is no attribute alias
, then get_alias.default
returns NULL
.
data.frame
: Calls get_alias
on every column.
list
: Calls get_alias
on every element of the list.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.