Learn R Programming

nadiv (version 2.14.2)

numPed: Integer Format Pedigree

Description

Conversion, checking, and row re-ordering of a pedigree in integer form of class numPed.

Usage

numPed(pedigree, check = TRUE)
is.numPed(x)
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 numPed
i, ...
Index specifying elements to extract or replace: see [

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'.

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 preceeding 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

See Also

prepPed, MCMCglmm, [

Examples

Run this code
(nPed <- numPed(Mrode2))
is.numPed(nPed)

# re-order and retain class 'numPed'
ronPed(nPed, order(nPed[, 2], nPed[, 3]))

Run the code above in your browser using DataLab