dm (version 0.0.3.9003)

reunite_parent_child: Merge two tables linked by a foreign key relation

Description

Perform table fusion by combining two tables by a common (key) column and then removing this column.

reunite_parent_child(): After joining the two tables by the column id_column, this column is removed. The transformation is roughly the inverse of what decompose_table() does.

reunite_parent_child_from_list(): After joining the two tables by the column id_column, this column is removed.

The function is almost exactly the inverse of decompose_table() (the order of the columns is not retained and original rownames are lost).

Usage

reunite_parent_child(child_table, parent_table, id_column)

reunite_parent_child_from_list(list_of_parent_child_tables, id_column)

Arguments

child_table

Table (possibly created by decompose_table()) that references parent_table

parent_table

Table (possibly created by decompose_table()).

id_column

Identical name of referencing/referenced column in child_table/parent_table

list_of_parent_child_tables

Cf arguments child_table and parent_table from reunite_parent_child(), but both in a named list (as created by decompose_table()).

See Also

Other table surgery functions: decompose_table

Other table surgery functions: decompose_table