Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

founderInbreeding

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

Arguments

x

A ped object.

ids

Any subset of founders(x). If ids is missing in founderInbreeding(), it is set to founders(x).

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 ids, entries in the interval [0, 1]. If the vector is named, then the names are interpreted as ID labels of the founders whose inbreeding coefficients should be set. In this case, the ids argument should not be used. (See examples.)

Value

For founderInbreeding, a numeric vector of the same length as ids, containing the founder inbreeding coefficients.

For founderInbreeding<- the updated ped object is returned.

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)

pedtools

Creating and Working with Pedigrees and Marker Data

v0.9.7
GPL-3
Authors
Magnus Dehli Vigeland [aut, cre] (<https://orcid.org/0000-0002-9134-4962>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.