create_alias_mapping: Get Aliases of column names

View source: R/create_alias_mapping.R

create_alias_mappingR Documentation

Get Aliases of column names

Description

Column names of data.frame in atable must have syntactically valid colnames, see is_syntactically_valid_name. So no blanks or special characters allowed. But Reporting in human readable language needs special characters. These functions here allow atable to handle arbitrary character for pretty printing.

Usage

create_alias_mapping(DD, ...)

Arguments

DD

A data.frame

...

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.

See create_alias_mapping for the function that does the actual work.

If no aliases are found, then underscores in the column names of DD will be replaced by blanks. See Examples in ?atable.

Value

create_alias_mapping returns a data.frame with two columns old and new and as many rows as DD has columns. Column old contains the original column names of DD and column new their aliases.


atable documentation built on Sept. 11, 2024, 7:05 p.m.