founderInbreeding {pedtools} | R Documentation |
Inbreeding coefficients of founders
Description
Functions to get or set inbreeding coefficients for the pedigree founders.
Usage
founderInbreeding(x, ids, named = FALSE, chromType = "autosomal")
founderInbreeding(x, ids, chromType = "autosomal") <- value
setFounderInbreeding(x, ids = NULL, value, chromType = "autosomal")
Arguments
x |
A |
ids |
Any subset of |
named |
A logical: If TRUE, the output vector is named with the ID labels. |
chromType |
Either "autosomal" (default) or "x". |
value |
A numeric of the same length as |
Value
For founderInbreeding
, a numeric vector of the same length as
ids
, containing the founder inbreeding coefficients.
For setFounderInbreeding()
, a copy of x
with modified founder
inbreeding.
founderInbreeding<-
is an in-place version of setFounderInbreeding()
.
Examples
x = nuclearPed(father = "fa", mother = "mo", child = 1)
founderInbreeding(x, "fa") = 1
founderInbreeding(x, named = TRUE)
# Setting all founders at once (replacement value is recycled)
founderInbreeding(x, ids = founders(x)) = 0.5
founderInbreeding(x, named = TRUE)
# Alternative syntax, using a named vector
founderInbreeding(x) = c(fa = 0.1, mo = 0.2)
founderInbreeding(x, named = TRUE)