genetic_distance_matrix <- matrix(c(
0, 0.2836333, 0.2760485, 0.2685221, 0.2797302,0.3202661,
0.2836333, 0, 0.2867215, 0.2687472, 0.2596309, 0.2957862,
0.2760485,0.2867215, 0, 0.297918, 0.3057039, 0.3153261,
0.2685221, 0.2687472, 0.297918,0, 0.2753477, 0.3042383,
0.2797302, 0.2596309, 0.3057039, 0.2753477, 0,0.3398558,
0.3202661, 0.2957862, 0.3153261, 0.3042383, 0.3398558, 0),
nrow = 6, byrow = TRUE,dimnames = list(c("Sample1", "Sample2",
"Sample3", "Ind1", "Ind2", "Ind3"),
c("Sample1", "Sample2", "Sample3", "Ind1", "Ind2", "Ind3")))
MDSplot(distance=genetic_distance_matrix, pcs=c(1,3))
Run the code above in your browser using DataLab