make_parental_chain: Construct parental chain id vector from pedigree trio...

Description Usage Arguments Value Author(s) Examples

View source: R/RcppExports.R

Description

Create a vector of length n, giving the id of parental chains. If the pedigree is totally connected, then everyone will end up in tree 1, otherwise the tree numbers represent the disconnected subfamilies. Singleton subjects each have unique family numbers.

No check is done to ensure that the id, fid, and mid actually refer to proper family structure. References to ids in the fid and mid arguments that are not part of the id vector are considered founders.

Usage

1
make_parental_chain(id, fid, mid)

Arguments

id

Numeric vector of ids

fid

Numeric vector of ids of the father. This should be NA or 0 for a founder.

mid

Numeric vector of ids of the mother. This should be NA or 0 for a founder.

Value

Returns an integer vector giving the family index

Author(s)

Claus Ekstrom ekstrom@sund.ku.dk

Examples

1
2
3
4
id <- 1:11
fid <- c(0,0,1,0,0,4,0,0,3,7,7)
mid <- c(0,0,2,0,0,5,0,0,6,6,8)
make_parental_chain(id, fid, mid)

ekstroem/networkR documentation built on July 25, 2020, 8:30 a.m.