Learn R Programming

QTLRel (version 0.1)

pedRecode: Recode a Pedigree

Description

Prepare a pedigree in a format that is suitable for certain functions

Usage

pedRecode(ped,ids)

Arguments

ped
a pedigree, which is a data frame (id, sire, dam, ...). If "sex" is a component, male should be "M", "Male" or 1, and female should be "F", "Female" or 2 (other than 0 and 1). If given, "generation" can be numeric 0, 1, 2, ... or non-numeric "F0", "F1", "
ids
If given, only individuals with ids and their ancestors are kept in the recoded pedigree.

Value

  • A recoded pedigree.

Examples

Run this code
data(miscEx)

ped[1:10,]
pedR<- pedRecode(ped)
pedR[1:10,]
dim(pedR)
pedR<- pedRecode(ped,ids=ped$id[ped$gener=="F34"])
dim(pedR)

Run the code above in your browser using DataLab