Learn R Programming

dm (version 0.2.8)

dm_is_referenced: Check foreign key reference

Description

Is a table of a dm referenced by another table?

Usage

dm_is_referenced(dm, table)

Arguments

dm

A dm object.

table

A table in the dm.

Value

TRUE if at least one foreign key exists that points to the primary key of the table argument, FALSE otherwise.

See Also

Other functions utilizing foreign key relations: dm_get_referencing_tables()

Examples

Run this code
# NOT RUN {
dm_nycflights13() %>%
  dm_is_referenced(airports)
dm_nycflights13() %>%
  dm_is_referenced(flights)
# }

Run the code above in your browser using DataLab