# Admixture Format 1
df_admix <- data.frame(
Site = c("London", "Paris", "Berlin", "Rome", "Madrid"),
Cluster1 = c(0.95, 0.5, 0.1, 0, 0),
Cluster2 = c(0.05, 0.45, 0.45, 0.01, 0.75),
Cluster3 = c(0, 0.05, 0.45, 0.99, 0.25)
)
# Coordinates Format
df_coords <- data.frame(
Site = c("London", "Paris", "Berlin", "Rome", "Madrid"),
Lat = c(51.51, 48.85, 52.52, 41.90, 40.42),
Lon = c(-0.12, 2.35, 13.40, 12.49, -3.70)
)
merge_coords_data(df_coords, df_admix)
Run the code above in your browser using DataLab