| pedstats | R Documentation |
Calculates comprehensive statistics for a pedigree, including population structure, generation intervals, and ancestral depth.
pedstats(
ped,
timevar = NULL,
unit = "year",
cycle = NULL,
ecg = TRUE,
genint = TRUE,
...
)
ped |
A |
timevar |
Optional character. Name of the column containing the birth date (or hatch date) of each individual. Accepted column formats:
If |
unit |
Character. Time unit for reporting generation intervals:
|
cycle |
Numeric. Optional target generation cycle length in
|
ecg |
Logical. Whether to compute equivalent complete generations
for each individual via |
genint |
Logical. Whether to compute generation intervals via
|
... |
Additional arguments passed to |
An object of class pedstats, which is a list containing:
summary: A data.table with one row summarising the
whole pedigree. Columns:
N — total number of individuals.
NSire — number of unique sires.
NDam — number of unique dams.
NFounder — number of founder individuals
(both parents unknown).
MaxGen — maximum generation number.
ecg: A data.table with one row per individual
(NULL if ecg = FALSE). Columns:
Ind — individual identifier.
ECG — equivalent complete generations.
FullGen — number of fully known generations.
MaxGen — maximum traceable generation depth.
gen_intervals: A data.table of generation intervals
(NULL if no timevar is detected or
genint = FALSE). Columns:
Pathway — gametic pathway label. Seven values:
"SS" (sire to son), "SD" (sire to daughter),
"DS" (dam to son), "DD" (dam to daughter) —
require offspring sex; "SO" (sire to offspring) and
"DO" (dam to offspring) — sex-independent; and
"Average" — all parent-offspring pairs combined.
N — number of parent-offspring pairs.
Mean — mean generation interval.
SD — standard deviation of the interval.
GenEquiv — Mean / cycle (only present when
cycle is supplied).
# ---- Without time variable ----
tp <- tidyped(simple_ped)
ps <- pedstats(tp)
ps$summary
ps$ecg
# ---- With annual Year column (big_family_size_ped) ----
tp2 <- tidyped(big_family_size_ped)
ps2 <- pedstats(tp2, timevar = "Year")
ps2$summary
ps2$gen_intervals
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.