| pedfclass | R Documentation |
Classifies individuals into inbreeding levels based on their inbreeding coefficients (F) according to standard or user-defined thresholds.
pedfclass(ped, breaks = c(0.0625, 0.125, 0.25), labels = NULL)
ped |
A |
breaks |
Numeric vector of strictly increasing positive upper bounds for
inbreeding classes. Default is |
labels |
Optional character vector of interval labels. If |
The default thresholds follow common pedigree interpretation rules:
F = 0.0625: approximately the offspring of half-sib mating.
F = 0.125: approximately the offspring of avuncular or grandparent-grandchild mating.
F = 0.25: approximately the offspring of full-sib or parent-offspring mating.
Therefore, assigning F = 0.25 to the class "0.125 < F <= 0.25"
is appropriate. If finer reporting is needed, supply custom breaks,
for example to separate 0.25, 0.375, or 0.5.
A data.table with 3 columns:
FClassAn ordered factor. By default it contains 5 levels:
"F = 0", "0 < F <= 0.0625", "0.0625 < F <= 0.125",
"0.125 < F <= 0.25", and "F > 0.25". The number of levels
equals length(breaks) + 2 (the fixed zero class plus one class per
bounded interval plus the open-ended tail).
CountInteger. Number of individuals in each class.
PercentageNumeric. Percentage of individuals in each class.
tp <- tidyped(simple_ped, addnum = TRUE)
pedfclass(tp)
# Finer custom classes (4 breaks, labels auto-generated)
pedfclass(tp, breaks = c(0.03125, 0.0625, 0.125, 0.25))
# Custom labels aligned to breaks (3 labels for 3 breaks; tail is auto)
pedfclass(tp, labels = c("Low", "Moderate", "High"))
tp_inbred <- tidyped(inbred_ped, addnum = TRUE)
pedfclass(tp_inbred)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.