pedsubpop: Pedigree Subpopulations

pedsubpopR Documentation

Pedigree Subpopulations

Description

Summarizes pedigree subpopulations and group structure.

Usage

pedsubpop(ped, by = NULL)

Arguments

ped

A tidyped object.

by

Character. The name of the column to group by. If NULL, summarizes disconnected components via splitped.

Details

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.

Value

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).

Examples

tp <- tidyped(simple_ped)

# Summarize disconnected pedigree components
pedsubpop(tp)

# Summarize by an existing grouping variable
pedsubpop(tp, by = "Gen")


visPedigree documentation built on March 30, 2026, 9:07 a.m.