ped2com {BGmisc} | R Documentation |
Take a pedigree and turn it into a relatedness matrix
Description
Take a pedigree and turn it into a relatedness matrix
Usage
ped2com(
ped,
component,
max.gen = 25,
sparse = FALSE,
verbose = FALSE,
gc = FALSE,
flatten.diag = FALSE,
standardize.colnames = TRUE,
tcross.alt.crossprod = FALSE,
tcross.alt.star = FALSE,
...
)
Arguments
ped |
a pedigree dataset. Needs ID, momID, and dadID columns |
component |
character. Which component of the pedigree to return. See Details. |
max.gen |
the maximum number of generations to compute (e.g., only up to 4th degree relatives). The default is 25. However it can be set to infinity. 'Inf' uses as many generations as there are in the data. |
sparse |
logical. If TRUE, use and return sparse matrices from Matrix package |
verbose |
logical. If TRUE, print progress through stages of algorithm |
gc |
logical. If TRUE, do frequent garbage collection via |
flatten.diag |
logical. If TRUE, overwrite the diagonal of the final relatedness matrix with ones |
standardize.colnames |
logical. If TRUE, standardize the column names of the pedigree dataset |
tcross.alt.crossprod |
logical. If TRUE, use alternative method of using Crossprod function for computing the transpose |
tcross.alt.star |
logical. If TRUE, use alternative method of using %\*% for computing the transpose |
... |
additional arguments to be passed to |
Details
The algorithms and methodologies used in this function are further discussed and exemplified in the vignette titled "examplePedigreeFunctions". For more advanced scenarios and detailed explanations, consult this vignette.