| pedsubpop | R Documentation |
Summarizes pedigree subpopulations and group structure.
pedsubpop(ped, by = NULL)
ped |
A |
by |
Character. The name of the column to group by.
If NULL, summarizes disconnected components via |
When by = NULL, this function is a lightweight summary wrapper around
splitped, returning one row per disconnected pedigree component
plus an optional "Isolated" row for individuals with no known parents
and no offspring. When by is provided, it instead summarizes the pedigree
directly by the specified column (e.g. "Gen", "Year", "Breed").
Use pedsubpop() when you want a compact analytical summary table.
Use splitped when you need the actual re-tidied sub-pedigree
objects for downstream plotting or analysis.
A data.table with columns:
Group: Subpopulation label.
N: Total individuals.
N_Sire: Number of distinct sires.
N_Dam: Number of distinct dams.
N_Founder: Number of founders (parents unknown).
tp <- tidyped(simple_ped)
# Summarize disconnected pedigree components
pedsubpop(tp)
# Summarize by an existing grouping variable
pedsubpop(tp, by = "Gen")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.