Learn R Programming

identity (version 0.2-1)

identity.coefs: Compute condensed identify coefficients

Description

Compute condensed identify coefficients.

Usage

identity.coefs (samples, pedigree)

Arguments

samples
either a vector of individual IDs or a matrix of two columns, each row reprepresents a pair of IDs.
pedigree
a matrix of three columns, id, mother id, and father id, respectively, specifying the pedigree structure.

Value

a matrix of 11 columns, the first two columns give the pair of IDs, and the rest 9 columns give the 9 identity coefficients (delta 1 to delta 9).

Details

Id must be integers with 0 indicating individuals not included in the pedigree.

Note that each time this function is called, it will recreate the C representation of the pedigree structure and the hash table. Thus it is very inefficient to call this function many times with the same pedigree. Normally you would only need call the function once to calculate the identity coefficients for all pairs of individuals.

References

This R package is based on the C program Idcoefs 2.0 beta by Mark Abney (abney@uchicago.edu).

See also Lynch and Walsh (1998) Genetics and Analysis of Quantitative Traits.

Examples

Run this code
ex <- read.table (system.file ("example", "ex.pedigree",
                  package = "identity"))
identity.coefs (c(150, 151, 152), ex)

Run the code above in your browser using DataLab