View source: R/func_data_transformation.R
transform_admix_data | R Documentation |
Internal function used to transform admixture data into the correct format for plotting.
transform_admix_data(data)
data |
data.frame or tibble. |
A data.frame or tibble.
# Admixture Format 1
df_admix <- data.frame(
Site = c("London", "London", "Paris", "Paris", "Berlin", "Berlin",
"Rome", "Rome", "Madrid", "Madrid"),
Ind = c("London1", "London2", "Paris1", "Paris2", "Berlin1", "Berlin2",
"Rome1", "Rome2", "Madrid1", "Madrid2"),
Cluster1 = c(1.0, 0.9, 0.5, 0.5, 0.1, 0.1, 0, 0, 0, 0),
Cluster2 = c(0, 0.10, 0.50, 0.40, 0.50, 0.40, 0.01, 0.01, 0.70, 0.80),
Cluster3 = c(0, 0, 0, 0.10, 0.40, 0.50, 0.99, 0.99, 0.30, 0.20)
)
transform_admix_data(df_admix)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.