This function identifies records in an entire branch of the family tree above a certain individual.
get_ancestors(
gedcom,
indi_xref = character(),
inc_indi = FALSE,
inc_sibs = FALSE,
inc_famg = FALSE,
inc_supp = FALSE,
birth_only = TRUE
)
A tidyged object.
The xref of an Individual record to act on if one is not activated (will override active record).
Whether to also include the individual themselves.
Whether to also include all siblings of ancestors (siblings of this individual will only be included if the individual is included).
Whether to also include all Family Group records where this individual is a child (and all ancestors' Family Group records).
Whether to also include all supporting records (Note, Source, Repository, Multimedia).
Whether to only include biological ancestors.
A vector of xrefs of ancestors.
get_ancestors(sample555, "@I3@")
#> [1] "@I1@" "@I2@"
get_ancestors(sample555, "@I3@", inc_indi = TRUE)
#> [1] "@I3@" "@I1@" "@I2@"
get_ancestors(sample555, "@I3@", inc_indi = TRUE, inc_famg = TRUE)
#> [1] "@F1@" "@I3@" "@I1@" "@I2@"