enum_pk_candidates | R Documentation |
enum_pk_candidates()
checks for each column of a
table if the column contains only unique values, and is thus
a suitable candidate for a primary key of the table.
dm_enum_pk_candidates()
performs these checks
for a table in a dm object.
enum_pk_candidates(table, ...)
dm_enum_pk_candidates(dm, table, ...)
table |
A table in the |
... |
These dots are for future extensions and must be empty. |
dm |
A |
A tibble with the following columns:
columns
columns of table
,
candidate
boolean: are these columns a candidate for a primary key,
why
if not a candidate for a primary key column, explanation for this.
These functions are marked "experimental" because we are not yet sure about
the interface, in particular if we need both dm_enum...()
and enum...()
variants.
Changing the interface later seems harmless because these functions are
most likely used interactively.
Other primary key functions:
dm_add_pk()
,
dm_add_uk()
,
dm_get_all_pks()
,
dm_get_all_uks()
,
dm_has_pk()
,
dm_rm_pk()
,
dm_rm_uk()
nycflights13::flights %>%
enum_pk_candidates()
dm_nycflights13() %>%
dm_enum_pk_candidates(airports)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.