Propagate Column
propagate.Rd
propagate
copy columns from a given table of a dm
object to all tables based on other common columns. If several
rows are associated with the same key, the rows will be duplicated in the receiving tables. In safe mode, the key
must be unique in the original table.
Arguments
- db
(
dm
) object for which some variable need to be propagated.- from
(
string
) the name of the table where the variables to propagate are stored.- add
(
character
) the names of the variables to propagate.- by
(
character
) the key binding thefrom
table to the other tables.- safe
(
flag
) should the key be checked for uniqueness in thefrom
table.
Examples
db <- dm::dm_nycflights13()
res <- propagate(db, "airlines", "name", "carrier", safe = TRUE)
#>
#> Skipping: airlines
#> Skipping: airports
#> Updating: flights with: name
#> Skipping: planes
#> Skipping: weather