dm (version 0.0.3.9003)

cdm_disambiguate_cols: Avoid column name conflicts

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, since only one column should remain, when two tables linked by a key relation are joined.

Usage

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

Arguments

dm

A dm object.

sep

The character variable separating the table names and the ambiguous column names

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