numPed: Integer Format Pedigree

View source: R/numPed.R

numPedR 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)

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 [

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)

matthewwolak@gmail.com

See Also

prepPed, MCMCglmm, [

Examples


(nPed <- numPed(Mrode2))
is(nPed)

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


nadiv documentation built on Dec. 8, 2022, 1:11 a.m.