# NOT RUN {
# construct a dummy kinship matrix
kinship <- matrix(c(0.5, 0, 0, 0.6), nrow=2)
# this is the ordinary mean
mean_kinship(kinship)
# weighted mean with twice as much weight on the second individual
# (weights are internally normalized to sum to one)
weights <- c(1, 2)
mean_kinship(kinship, weights)
# }
Run the code above in your browser using DataLab