# NOT RUN {
data(WarblerG)
A<-extractA(WarblerG)
ped<-matrix(NA, 5,3)
ped[,1]<-1:5
ped[,2]<-c(rep(NA, 4), 3)
ped[,3]<-c(rep(NA, 4), 4)
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)
var1<-expression(varPed(x="offspring", restrict=0))
PdP<-PdataPed(formula=list(var1), data=data)
X.list<-getXlist(PdP)
# creates design matrices for offspring (in this case indivdiual "5")
X.list<-mismatches(X.list, G=genotypes$Gobs)
X.list<-fillX.G(X.list, A=A, G=genotypes$Gobs)
X.list.reord<-reordXlist(X.list)
# The design matrices for the genetic likelihoods are reordered
# by the number of mismatches. The true parental combination
# now appears first rather than last.
X.list$X$"5"$G
X.list.reord$X$"5"$G
# }
Run the code above in your browser using DataLab