dm_disambiguate_cols | R Documentation |
This function ensures that all columns in a dm
have unique names.
dm_disambiguate_cols(
dm,
.sep = ".",
...,
.quiet = FALSE,
.position = c("suffix", "prefix")
)
The function first checks if there are any column names that are not unique. If there are, those columns will be assigned new, unique, names by prefixing their existing name with the name of their table and a separator. Columns that act as primary or foreign keys will not be renamed because only the foreign key column will remain when two tables are joined, making that column name "unique" as well.
A dm
whose column names are unambiguous.
dm_nycflights13() %>%
dm_disambiguate_cols()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.