Title: | Describe Pedigree Relationships in Words |
---|---|
Description: | Describe in words the genealogical relationship between two members of a given pedigree, using the algorithm in Vigeland (2022) <doi:10.1186/s12859-022-04759-y>. 'verbalisr' is part of the 'pedsuite' collection of packages for pedigree analysis. For a demonstration of 'verbalisr', see the online app 'QuickPed' at <https://magnusdv.shinyapps.io/quickped>. |
Authors: | Magnus Dehli Vigeland [aut, cre]
|
Maintainer: | Magnus Dehli Vigeland <[email protected]> |
License: | GPL-3 |
Version: | 0.7.1.9000 |
Built: | 2025-02-14 04:56:54 UTC |
Source: | https://github.com/magnusdv/verbalisr |
A subset of the royal Habsburg family, showing the ancestry of (the infamously inbred) King Charles II of Spain.
habsburg
habsburg
A ped
object containing a pedigree with 29 members.
Adapted from https://en.wikipedia.org/wiki/Habsburg_family_tree
plot(habsburg, hatched = "Charles II", cex = 0.7) verbalise(habsburg, ids = parents(habsburg, "Charles II"))
plot(habsburg, hatched = "Charles II", cex = 0.7) verbalise(habsburg, ids = parents(habsburg, "Charles II"))
This documents the options for formatting and printing the output of
verbalise()
.
## S3 method for class 'pairrel' print(x, ...) ## S3 method for class 'pairrel' format( x, cap = TRUE, simplify = FALSE, abbreviate = FALSE, collapse = NULL, includePaths = !simplify, ... )
## S3 method for class 'pairrel' print(x, ...) ## S3 method for class 'pairrel' format( x, cap = TRUE, simplify = FALSE, abbreviate = FALSE, collapse = NULL, includePaths = !simplify, ... )
x |
An output of |
... |
Arguments passed on to |
cap |
A logical indicating if the first letter of each path description should be capitalised. By default TRUE. |
simplify |
A logical. If TRUE, the descriptions of lineal and avuncular relationships are simplified. Default: FALSE. |
abbreviate |
A logical. It TRUE, various abbreviations are applied to the descriptions, e.g. 'great-great-' -> 'gg-' and 'once removed' -> '1r'. Default: FALSE. |
collapse |
A single string, or NULL. If given, and the relationship has
multiple descriptions, these are concatenated with |
includePaths |
A logical indicating if the complete paths should be included in the output. By default TRUE. |
The description includes all pedigree paths between the two individuals,
indicating with brackets the topmost common ancestors in each path. See
print.pairrel()
for formatting options when printing the results.
verbalise(x, ids = leaves(x))
verbalise(x, ids = leaves(x))
x |
A |
ids |
A vector containing the names of two pedigree members. |
An object of class pairrel
. This is essentially a list of lists,
containing many details about each path between the individuals. Most users
will not interact with this list directly, but simply use the description
provided by the print()
method.
# Example 1: Family quartet x = nuclearPed(2) verbalise(x, 1:2) verbalise(x, 2:3) verbalise(x, 3:4) # Simplified output verbalise(x, 2:3) |> print(simplify = TRUE) # Example 2: Complicated cousin pedigree y = doubleCousins(degree1 = 1, removal1 = 1, half1 = TRUE, degree2 = 2, removal2 = 0, half2 = FALSE) verbalise(y) # Example 3: Full sib mating z = fullSibMating(1) verbalise(z) verbalise(z, ids = c(1,5)) verbalise(z, ids = c(1,5)) |> print(simplify = TRUE) # Example 4: Quad half first cousins w = quadHalfFirstCousins() verbalise(w)
# Example 1: Family quartet x = nuclearPed(2) verbalise(x, 1:2) verbalise(x, 2:3) verbalise(x, 3:4) # Simplified output verbalise(x, 2:3) |> print(simplify = TRUE) # Example 2: Complicated cousin pedigree y = doubleCousins(degree1 = 1, removal1 = 1, half1 = TRUE, degree2 = 2, removal2 = 0, half2 = FALSE) verbalise(y) # Example 3: Full sib mating z = fullSibMating(1) verbalise(z) verbalise(z, ids = c(1,5)) verbalise(z, ids = c(1,5)) |> print(simplify = TRUE) # Example 4: Quad half first cousins w = quadHalfFirstCousins() verbalise(w)