Learn R Programming

dm (version 0.0.5)

cdm_disambiguate_cols: Avoid conflicts in column names

Description

This function checks all tables for column names that are not unique (across the entire dm object), and renames those columns by prefixing the respective table name and a separator. Key columns will not be renamed because only one column should remain when two tables that are linked by a key relation are joined.

Usage

cdm_disambiguate_cols(dm, sep = ".", quiet = FALSE)

Arguments

dm

A dm object.

sep

The character variable that separates the names of the table and the names of the ambiguous columns.

quiet

Boolean. By default, this function lists the renamed columns in a message, pass FALSE to suppress this message.

Examples

Run this code
# NOT RUN {
cdm_disambiguate_cols(cdm_nycflights13())
# }

Run the code above in your browser using DataLab