dm_wrap_tbl | R Documentation |
dm_wrap_tbl()
creates a single tibble dm containing the root
table
enhanced with all the data related to it
through the relationships stored in the dm.
It runs a sequence of dm_nest_tbl()
and dm_pack_tbl()
operations
on the dm.
dm_wrap_tbl(dm, root, strict = TRUE, progress = NA)
dm |
A cycle free dm object. |
root |
Table to wrap the dm into (unquoted). |
strict |
Whether to fail for cyclic dms that cannot be wrapped into a
single table, if |
progress |
Whether to display a progress bar, if |
dm_wrap_tbl()
is an inverse to dm_unwrap_tbl()
,
i.e., wrapping after unwrapping returns the same information
(disregarding row and column order).
The opposite is not generally true:
since dm_wrap_tbl()
keeps only rows related directly or indirectly to
rows in the root
table.
Even if all referential constraints are satisfied,
unwrapping after wrapping loses rows in parent tables
that don't have a corresponding row in the child table.
This function differs from dm_flatten_to_tbl()
and dm_squash_to_tbl()
,
which always return a single table, and not a dm
object.
A dm
object.
dm_unwrap_tbl()
, dm_nest_tbl()
,
dm_examine_constraints()
,
dm_examine_cardinalities()
.
dm_nycflights13() %>%
dm_wrap_tbl(root = airlines)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.