# NOT RUN {
data(WarblerG)
A<-extractA(WarblerG)
ped<-matrix(NA, 5,3)
ped[,1]<-1:5
ped[,2]<-c(rep(NA, 4), 1)
ped[,3]<-c(rep(NA, 4), 2)
genotypes<-simgenotypes(A, ped=ped)
sex<-c("Female", "Male", "Female", "Male","Female")
offspring<-c(0,0,0,0,1)
data<-data.frame(id=ped[,1], sex, offspring)
res1<-expression(varPed(x="offspring", restrict=0))
PdP<-PdataPed(formula=list(res1), data=data)
X.list<-getXlist(PdP)
# creates design matrices for offspring (in this case indivdiual "5")
X.list.MM<-mismatches(X.list, G=genotypes$Gobs, mm.tol=0)
# genetic likelihoods are arranged sires within dams
X.list.MM$X$"5"$mmD
# number of mismatches between offspring "5" and dams "1" and "3"
X.list.MM$X$"5"$mmS
# number of mismatches between offspring "5" and sires "4" and "5"
X.list.MM$X$"5"$restdam.id
X.list.MM$X$"5"$dam.id
# dams with mismatches are excluded mismatch (mm.tol=0)
X.list.MM$X$"5"$restsire.id
X.list.MM$X$"5"$sire.id
# sires with mismatches are excluded mismatch (mm.tol=0)
# }
Run the code above in your browser using DataLab