Creates an example dm
object from the tables in nycflights13,
along with the references.
See nycflights13::flights
for a description of the data.
As described in nycflights13::planes
, the relationship
between the flights
table and the planes
tables is "weak", it does not satisfy
data integrity constraints.
Usage
dm_nycflights13(
...,
cycle = FALSE,
color = TRUE,
subset = TRUE,
compound = TRUE,
table_description = FALSE
)
Arguments
- ...
These dots are for future extensions and must be empty.
- cycle
Boolean. If
FALSE
(default), only one foreign key relation (fromflights$origin
toairports$faa
) between theflights
table and theairports
table is established. IfTRUE
, adm
object with a double reference between those tables will be produced.- color
Boolean, if
TRUE
(default), the resultingdm
object will have colors assigned to different tables for visualization withdm_draw()
.- subset
Boolean, if
TRUE
(default), theflights
table is reduced to flights with columnday
equal to 10.- compound
Boolean, if
FALSE
, no link will be established between tablesflights
andweather
, because this requires compound keys.- table_description
Boolean, if
TRUE
, a description will be added for each table that will be displayed when drawing the table withdm_draw()
.
Value
A dm
object consisting of nycflights13 tables, complete with primary and foreign keys and optionally colored.