# NOT RUN {
# Constructing a G-matrix:
G <- matrix(c(
1, 1, 0, 1,
1, 2, 1, 1,
0, 1, 2, 1,
1, 1, 1, 3
), ncol = 4)
# Computing a conditional 2x2 sub-matrix by conditioning on
# trait 3 and 4:
G_sub_conditional <- conditionalG(G, condition_on = c(3, 4))
G_sub_conditional
# The average evolvabilities of this matrix can then be
# compared can than be compared to the average evolvabilities
# of the corresponding unconditional sub-matrix of G:
evolvabilityMeans(G_sub_conditional)
evolvabilityMeans(G[-c(3, 4), -c(3, 4)])
# }
Run the code above in your browser using DataLab