add_indi_links_to_families: Add family links as a child or spouse

View source: R/individual_links.R

add_indi_links_to_familiesR Documentation

Add family links as a child or spouse

Description

This function adds links connecting an Individual record to existing Family Group records. Family links will be added to the Individual record, and the Family Group records will be updated to link to this individual.

Usage

add_indi_links_to_families(
  gedcom,
  parents = character(),
  child_linkage_type = "birth",
  child_linkage_notes = character(),
  spouse = character(),
  children = character(),
  spouse_linkage_notes = character(),
  xref = character(),
  famg_xref_chil = character(),
  famg_xref_spou = character(),
  update_date_changed = TRUE
)

Arguments

gedcom

A tidyged object.

parents

A character vector of parent xrefs so that this person can be linked to a Family Group record as a child.

child_linkage_type

A code used to indicate the relationship with the parent(s). Either, "birth" (default), "foster", or "adopted".

child_linkage_notes

A character vector of notes accompanying the family linkage as a child. These could be xrefs to existing Note records.

spouse

The xref of the spouse so that this person can be linked to a Family Group record as a spouse.

children

A character vector of children xrefs so that this person can be linked to a Family Group record as a spouse.

spouse_linkage_notes

A character vector of notes accompanying the family linkage as a spouse These could be xrefs to existing Note records.

xref

The xref of a record to act on if one is not activated (will override active record).

famg_xref_chil

The xref of a Family Group record to be added to as a child. This is not required if any parents are given, but if it is provided, it will override any parents given.

famg_xref_spou

The xref of a Family Group record to be added to as a spouse. This is not required if the spouse or children are given, but if it is provided, it will override any spouses or children given.

update_date_changed

Whether to add/update the change date for the records.

Details

The function will only add one link to a Family Group record as a child, and one link to a Family Group record as a spouse.

Value

An updated tidyged object with an expanded Individual record including the family link(s) and expanded Family Group record(s) linking to this individual.


jl5000/tidygedcom documentation built on June 22, 2022, 5:16 p.m.