Learn R Programming

ggenealogy (version 0.2.0)

plotAncDes: Returns the image object to show the ancestors and descendants of a variety

Description

Returns the image object to show the ancestors and descendants of a variety, with the variety highlighted, if desired

Usage

plotAncDes(v1, geneal, mAnc = 3, mDes = 3, vColor = "#D35C79")

Arguments

v1
the label of the variety/vertex of interest (in character string format)
geneal
the full genealogy (in data frame format)
mAnc
the maximum number of generations of ancestors of v1 to be displayed (in numeric format)
mDes
the maximum number of generations of descendants of v1 to be displayed (in numeric format)
vColor
the color of the text of the main variety

Examples

Run this code
data(sbGeneal)
plotAncDes("Tokyo", sbGeneal, vColor = "red")
plotAncDes("Essex", sbGeneal, 2, 3, "blue") + ggplot2::labs(x = "Generation index", y = "")

Run the code above in your browser using DataLab