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

mergePed

Merge two pedigrees


Description

This function merges two linkdat objects, joining them at the individuals with equal ID labels. This is especially useful for building 'top-heavy' pedigrees. Only linkdat objects without marker data are supported.

Usage

mergePed(x, y, quick = FALSE)

Arguments

x, y

linkdat objects

quick

a single logical. If TRUE, no pedigree checks are performed, and the individual ordering may be unfortunate.

Value

A linkdat object.

Author(s)

Magnus Dehli Vigeland

Examples

# Creating a trio where each parent have first cousin parents.
# (Alternatively, this could be built using many calls to addParents().)

x = cousinPed(1)
x = addOffspring(x, father=7, mother=8, noffs=1, id=9)
x = addOffspring(x, father=9, mother=10, noffs=1, id=11)

y = relabel(cousinPed(1), 101:108)
y = addOffspring(y, father=107, mother=108, noffs=1, sex=2, id=10)
y = addOffspring(y, father=9, mother=10, noffs=1, id=11)

# Joining x and y at the common individuals 9,10,11:
z = mergePed(x,y)

# plot all three pedigrees 
par(mfrow=c(1,3))
plot(x); plot(y); plot(z)

paramlink

Parametric Linkage and Other Pedigree Analysis in R

v1.1-2
GPL (>= 2)
Authors
Magnus Dehli Vigeland [aut, cre], Thore Egeland [ctb], Guro Doerum [ctb]
Initial release
2018-01-05

We don't support your browser anymore

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