numPed {nadiv} | R Documentation |
Integer Format Pedigree
Description
Conversion, checking, and row re-ordering of a pedigree in integer form of class ‘numPed’.
Usage
numPed(pedigree, check = TRUE)
ronPed(x, i, ...)
Arguments
pedigree |
A three column pedigree object, where the columns correspond to: ID, Dam, & Sire |
check |
A logical argument indicating if checks on the validity of the pedigree structure should be made, but see Details |
x |
A pedigree of class ‘ |
i , ... |
Index specifying elements to extract or replace: see
|
Details
Missing parents (e.g., base population) should be denoted by either 'NA', '0', '-998', or '*'.
Individuals must appear in the ID column in rows preceding where they
appear in either the Dam or Sire column. See the
prepPed
function if this is not the case.
If pedigree inherits the class "numPed" (from a previous call to
numPed()
) and check = TRUE
, the checks are skipped. If
check = FALSE
any pedigree will be transformed into a pedigree
consisting of integers and missing values denoted by '-998'.
Based on code from the MCMCglmm
package
Value
An S3 object of class “numPed” representing the pedigree,
where individuals are now numbered from 1 to n
and unknown parents
are assigned a value of ‘-998’.
Author(s)
See Also
Examples
(nPed <- numPed(Mrode2))
class(nPed)
# re-order and retain class 'numPed'
ronPed(nPed, order(nPed[, 2], nPed[, 3]))
class(nPed)