powered by
dm
dm_has_pk() checks if a given table has columns marked as its primary key.
dm_has_pk()
dm_has_pk(dm, table)
A dm object.
A table in the dm.
A logical value: TRUE if the given table has a primary key, FALSE otherwise.
TRUE
FALSE
Other primary key functions: dm_add_pk(), dm_get_all_pks(), dm_get_pk(), enum_pk_candidates()
dm_add_pk()
dm_get_all_pks()
dm_get_pk()
enum_pk_candidates()
# NOT RUN { library(dplyr) nycflights_dm <- dm_nycflights13() nycflights_dm %>% dm_has_pk(planes) # }
Run the code above in your browser using DataLab