Checks that the columns in a data frame form a many-to-one join with correponding columns in parent.
check_join( data, parent, join = NULL, referential = TRUE, extra = "Comments", ignore_nas = FALSE, data_name = substitute(data), parent_name = substitute(parent) )
data | The data frame to check. |
---|---|
parent | A data frame of the parent table. |
join | A character vector of the join columns. Use a named character vector if the names of the columns differ. |
referential | A flag indicating whether to check for referential integrity. |
extra | A flag indicating whether to allow additional matching columns or a character vector of the names to allow. |
ignore_nas | A flag indicating whether to ignore missing values or treat them as values. |
data_name | A string of the name of data. |
parent_name | A string of the name of parent. |
Throws an informative error or returns an invisible copy of data.
By default (join = NULL
) all the columns in parent represent the join key.