# Load the ASOIAF dataset
data(ASOIAF)
df_ASOIAF <- ASOIAF[ASOIAF$famID == 26, ] # Subset to House Tarth
# View the structure of the dataset
str(df_ASOIAF)
# Plot a pedigree for House Tarth
if (requireNamespace("ggplot2", quietly = TRUE)) {
# Create a pedigree plot for House Tarth
ggPedigree(df_ASOIAF,
famID = "famID",
personID = "id",
momID = "momID",
dadID = "dadID",
config = list(
add_phantoms = TRUE,
code_male = "M"
)
)
}
Run the code above in your browser using DataLab