coeffTable | R Documentation |
Creates a data frame containing various relatedness coefficients between all pairs of individuals in a given pedigree.
coeffTable(
x,
ids = labels(x),
coeff = c("f", "phi", "deg", "kappa", "identity", "detailed"),
self = FALSE,
Xchrom = FALSE
)
x |
A pedigree in the form of a |
ids |
A character (or coercible to character) containing ID labels of two or more pedigree members. |
coeff |
A character vector containing one or more of the keywords "f", "phi", "deg", "kappa", "identity", "detailed". |
self |
A logical indicating if self-relationships should be included. Default: FALSE. |
Xchrom |
A logical indicating if the coefficients should be autosomal
(default) or X-chromosomal. If |
Available coefficients (indicated in coeff
) include:
f
: The inbreeding coefficient of each pair member. Columns: f1
and
f2
.
phi
: The kinship coefficient. Column: phi
.
deg
: The degree of relationship, as computed by kin2deg. Column: deg
kappa
: The IBD coefficients computed by kappaIBD. (These are NA for
pairs involving inbred individuals.) Columns: k0
, k1
, k2
.
identity
: The 9 condensed identity coefficients of Jacquard, computed by
identityCoefs()
. Columns: D1
, ..., D9
.
detailed
: The detailed identity coefficients of Jacquard, computed by
identityCoefs(..., detailed = TRUE)
. Columns: d1
, ..., d15
.
A data frame with one row for each pair of individuals. The first two
columns are characters named id1
and id2
, while remaining columns are
numeric. Columns containing X-chromosomal coefficients are suffixed with
".X".
If "f" (inbreeding) is the only coefficient, the data frame has one row per
individual, and the first column is named id
.
Note: If x
has members with unknown sex, all X-chromosomal coefficients
are NA.
# Uncle-nephew pedigree
x = avuncularPed()
# Complete table
coeffTable(x)
# Only selected coefficients
coeffTable(x, coeff = c("phi", "deg", "kappa"))
# Only the uncle-nephew pair
coeffTable(x, ids = c(3, 6), coeff = c("phi", "deg", "kappa"))
# X-chromosomal coefficients
coeffTable(x, Xchrom = TRUE, coeff = "kappa")
# Both autosomal and X
coeffTable(x, Xchrom = NA, coeff = "phi")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.