Take a pedigree and turn it into an extended environmental relatedness matrix
Source:R/buildComponentWrappers.R
ped2ce.RdTake a pedigree and turn it into an extended environmental relatedness matrix
Arguments
- ped
a pedigree dataset. Needs ID, momID, and dadID columns
- personID
Character. Column name for individual IDs.
- keep_ids
character vector of IDs to retain in the final relatedness matrix. When supplied, only the rows of
r2corresponding to these IDs are used in the tcrossprod, so the result is alength(keep_ids) x length(keep_ids)matrix. All columns ofr2are retained during the multiplication so relatedness values remain correct. IDs not found in the pedigree are silently dropped with a warning.- sparse
logical. If TRUE, use and return sparse matrices from Matrix package
- verbose
logical. If TRUE, print progress through stages of algorithm
- ...
additional arguments to be passed to
ped2com