pedRecode | R Documentation |
Prepare a pedigree in a format that is suitable for certain functions
pedRecode(ped, ids, all = TRUE, msg = TRUE)
ped |
A pedigree, which is a data frame (id, father/sire, mother/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", "F2", ..., which should be in an increasing order. Note: 0 is reserved for unknown |
ids |
If given, only individuals with |
all |
If false, fathers and mothers with no parents are treated as unknown. |
msg |
If false, messages are suppressed. |
This function is used in cic
, and it can be used for error checking with respect to sex and generation if sex and/or generation information is available. The actual values of generation can be anything but should correspond to the true order of generation; otherwise, cic
may fail or we may get incorrect results. Information except id
, father
and mother
is optional.
A recoded pedigree.
cic
.
data(miscEx)
pedF8[1:10,]
pedR<- pedRecode(pedF8)
pedR[1:10,]
dim(pedR)
pedR<- pedRecode(pedF8, ids=pedF8$id[pedF8$gener=="F8"])
dim(pedR)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.