View source: R/label-and-plot.R
| get_relations | R Documentation |
Applies [get_generations()] and [label_relatives()] to a tibble of family graph objects from [get_family_graphs()], returning a unified table of labelled pairwise relationships for all individuals across the specified families.
get_relations(
family_graphs,
fid = "fid",
family_id_vec = NULL,
fam_graph_col = "fam_graph"
)
family_graphs |
A tibble containing family-specific graph objects from [get_family_graphs()] (typically of class 'igraph'). Each row should correspond to a distinct family, with one column containing the graph object and another containing the family identifier (typically the proband's id). |
fid |
A character string specifying the name of the column in 'family_graphs' that holds the family identifiers. Defaults to '"fid"'. |
family_id_vec |
An optional character or numeric vector specifying which families to process. If 'NULL' (default), the function will process all families in 'family_graphs'. |
fam_graph_col |
A character string specifying the name of the column in 'family_graphs' that contains the family graph objects. Defaults to '"fam_graph"'. |
A tibble containing all labelled pairwise relationships across the specified families, with columns:
Family identifier (typically the proband's id).
Identifiers for the two individuals being compared.
Number of generations separating each individual from their most recent common ancestor.
Kinship coefficient between the pair.
Relationship label (e.g., '"S"', '"P"', '"GP"', '"1C"', '"HNib"').
[get_generations()] for computing generational distances and kinship coefficients, [label_relatives()] for labelling relationships based on generational patterns.
# See vignette
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.