# Get G matrix.
Gsp <- G.matrix(M = geno.apple, method = "VanRaden", sparseform = TRUE)$G.sparse
head(Gsp)
head(attr(Gsp, "rowNames"))
# Transform into full matrix.
G <- sparse2full(K = Gsp)
G[1:5, 1:5]
Run the code above in your browser using DataLab