getDegree: Determine the degree between two varieties

Description Usage Arguments References Examples

View source: R/allFunctions.R

Description

Returns the degree (distance between unweighted edges) between two varieties, where an edge represents a parent-child relationship

Usage

1
getDegree(v1, v2, ig, geneal)

Arguments

v1

the label of the first vertex of interest (in character string format)

v2

the label of the second vertex of interest (in character string format)

ig

the graph representation of the data genealogy (in igraph format)

geneal

the full genealogy (in data frame format)

References

Rutter L, VanderPlas S, Cook D, Graham MA (2019). ggenealogy: An R Package for Visualizing Genealogical Data. Journal of Statistical Software, 89(13), 1–31. doi: 10.18637/jss.v089.i13

Examples

1
2
3
data(sbGeneal)
ig <- dfToIG(sbGeneal)
getDegree("Brim", "Bedford", ig, sbGeneal)

Example output

[1] 6

ggenealogy documentation built on March 26, 2020, 9:25 p.m.