missingFK: Find registers with missing Foreign Key in the related table

View source: R/foreignKey.R

missingFKR Documentation

Find registers with missing Foreign Key in the related table

Description

Find registers with missing Foreign Key in the related table

Usage

missingFK(x, y, fk, pk, searchCandidates = FALSE, ...)

Arguments

x

a data.frame with a Foreign Key fk linking to y.

y

a data.frame with a Primary Key pk linking to x.

fk

columns containing the Foreign Key (column names or indexes) for x.

pk

columns containing the Primary Key (column names or indexes) for y.

searchCandidates

if TRUE, use agrep to find similar PKs for the missing FKs.

...

parameters passed to agrep.

The order of fk and pk must match.

Value

a data.frame with the registers in x with a missing Foreign Key. If searchCandidates is TRUE, the result have an attribute candidates with suggested FKs.


jmaspons/dbTools documentation built on March 10, 2024, 7:30 p.m.