Helper function used to retrieve the x and y coordinates of a specified relative (e.g., mom, dad, spouse) and join them into the main connection table. This supports relative-specific positioning in downstream layout functions like `calculateConnections()`.
getRelativeCoordinates(
ped,
connections,
relativeIDvar,
x_name,
y_name,
personID = "personID",
multiple = "all",
only_unique = TRUE
)
A `data.frame` with columns:
`personID`, `relativeIDvar`
`x_name`, `y_name`: Coordinates of the specified relative
Optionally, `newID` if present in `ped`
A data frame containing the pedigree data. Needs personID, momID, and dadID columns
A `data.frame` containing the individuals and their associated relative IDs.
Character. Name of the column in `connections` for the relative ID variable.
Character. Name of the new column to store the x-coordinate of the relative.
Character. Name of the new column to store the y-coordinate of the relative.
Character string specifying the column name for individual IDs. Defaults to "personID".
Character. Specifies how to handle multiple matches. Options are "all" or "any".
Logical. If TRUE, return only unique rows. Defaults to TRUE.